wow, that's super weird
A more useful property of this can be seen when using functions like map, e.g. [1,2,3].map(x => String(x)) can be shortened to just [1,2,3].map(String)
[1,2,3].map(x => String(x))
I wish I could master recursion, but it always comes back to bite me. Very impressive code, but unfortunately near impossible for most people to read.
can anyone explain how this works? :) TY!
Oh my, that is very clever! I'm surprised it works!
I like it!
check also this solution:
clean, compact, no recursion.
This comment is hidden because it contains spoiler information about the solution
Nice solution! Can easily go to 3000, with large delays for 1118 and 1202. Also 2375 has just a slight delay.
Damn, I forgot about substr. Well Done!
Agreed. Pure recursion is way too easy to blow up with a big input.
I'm glad to see the first solve appears. Happy coding ^_^