I think, it is a good kata to solve it considering possibility of some chaotic touch in the initial data.
Lets say, someone has messed up the initial array and all that "apple-promo recursion beauty" is gone.
I like the kata - though I`ve spent a good 2.5 hrs to tune the loops right so they can work steady.
The point of a kata is to come up with a clever solution to a problem. The realization that lead to this answer is why this kata was written the way it was.
This comment is hidden because it contains spoiler information about the solution
Array(n)
creates an array of lengthn
,[...Array(n)]
creates an array filled withundefined
, of lengthn
.Can you explain how you brought an array into the function without 'let arr = []'?
I think, it is a good kata to solve it considering possibility of some chaotic touch in the initial data.
Lets say, someone has messed up the initial array and all that "apple-promo recursion beauty" is gone.
I like the kata - though I`ve spent a good 2.5 hrs to tune the loops right so they can work steady.
The point of a kata is to come up with a clever solution to a problem. The realization that lead to this answer is why this kata was written the way it was.
The point of this kata is "this solves the problem". IMO.
This comment is hidden because it contains spoiler information about the solution
I don't get why this works?
Concept ?
This comment is hidden because it contains spoiler information about the solution
WTH, facepalm, now we know why it is 8 kyu XD
WAT seriously???
What's the difference?
That's not a solution, that is just hard coding !
This comment is hidden because it contains spoiler information about the solution
Loading more items...