function findSolution(target) {? function find(current, history) {? ? if (current == target) {? ? ? return history;? ? } else if (current > target) {? ? ? return null;? ? } else {? ? ? return find(current + 5, `(${history} + 5)`) ||? ? ? ? ? ? ?find(current * 3, `(${history} * 3)`);? ? }? }? return find(1, "1");}console.log(findSolution(24));為什么當到達63后current會慢慢減小,搞不懂,希望大佬解釋下
關于遞歸問題
我要去幼兒園深造了
2018-06-14 10:15:27