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.
interesting!
N делят на два , пока n не станет равной 1 или меньше, рекурсия рулит)
Рекурсия решает)
Recursion is power!)
как. это. блядь. работает?!
This comment is hidden because it contains spoiler information about the solution
2^0
?SOLVED: Don't modify the 'functions' array. If you pop, push, shift or unshift, it won't work because the tester function also calls the same functions from the same array. The same thing doesn't happen with the first four sample tests because the expected outcomes are hardcoded instead of being evaluated at runtime.
What he said. Random tests appear to expect the input. I can simply return the input value unchanged and all the random tests are passed but then the first four sample tests are incorrect.
A couple of examples:
Log
function (s){return s.toUpperCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
function (s){return s.split("")}
function (l){return l.join("-")}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
Random test 11 - Expected: '"lmxx9k"', instead got: '"L-m-x-x-9-k"'
Log
function (s){return s.toLowerCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
function (s){return s.toUpperCase()}
function (s){return s.toUpperCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
Random test 12 - Expected: '"wxb3wf"', instead got: '"Wxb3wf"'
We did the same lol
loop (reduce) inside loop??? best practice?? XD XD XD
you used tmp arrays. so you cheated !
cheated but clever :D
This comment is hidden because it contains spoiler information about the solution
You may try posting your code in a comment with a spoiler tag, so somebody may look at it. Before closing the issue I've completed the JS version, and verified that I'm applying all the functions correctly, and the intermediate values are changing, resulting in a value (possibly) different from the input.
At all. I just return a function that is the compostion of all functions in functions. (the normal tests are ok)
Loading more items...