Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Not a suggestion ~~
its in closure of the operator function!
when you call a number function
n
at here it returns a function, that cheks if it recives a argument or not,what if you pass th result of
plus
function with a value as argument ofseven
which recives a function?you have the operation check part with an
operation
likeplus
with argument involved in it,l
its hard a little bit , it took me 10 min to undrestand what he did !!!!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You are building a function expression there with "op" as the math operation and digit the left value. Thus the function "f(l)" it is build as a result of evaluating op(digit) in the ternary operator. Yeah, it is tricky but beautiful.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I'm having the same problem as Yuriy and have tried what feels like a million different refactors to cut the time down.
Attempted in Javascript using a Bubble Sort and Binary Search
Mine is 12000ms and I can't pass the kata because of "Execution Timed Out" =(
Added spoiler tag here ;)