We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
start
current
1 parent bb9515e commit af8852dCopy full SHA for af8852d
03_functions.txt
@@ -617,14 +617,14 @@ Here is a recursive solution:
617
[source,javascript]
618
----
619
function findSolution(target) {
620
- function find(start, history) {
621
- if (start == target)
+ function find(current, history) {
+ if (current == target)
622
return history;
623
- else if (start > target)
+ else if (current > target)
624
return null;
625
else
626
- return find(start + 5, "(" + history + " + 5)") ||
627
- find(start * 3, "(" + history + " * 3)");
+ return find(current + 5, "(" + history + " + 5)") ||
+ find(current * 3, "(" + history + " * 3)");
628
}
629
return find(1, "1");
630
0 commit comments