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.
single + at left of variable converts it to integer!
does the same as parseInt
Can’t believe it is SO simple! :)
As for the code, everything goes well if I am testing it outside of the kata. No problems with many nested levels, no problems with empty objects. However, I pass 6 tests from (?? 312 ??). I have no idea whether it is really expected I will write the tests. Is it? I haven’t checked other peoples’ solutions but I guess recursion is needed here, isn’t it? If so, the level of this kata is rather low!
I really like this attitude! The only thing I don’t understand is the + +cur on the second line. What is it for?
Oh, I have passed! It was a bit difficult :) The only thing I don’t understand to is why the second expected test result is "11 11 2000 10003 22 123 1234000 44444444 9999"? Isn’t "2000" bigger than "11" in the case of strings? Similar to "10003 22"?
I totally agree with moving this to a higher level! :)
This comment is hidden because it contains spoiler information about the solution
I have problems with results – I am sure my solution returns proper values (checked on https://www.binaryhexconverter.com/binary-to-decimal-converter). It seems there are bad numbers expected in many cases :( (e.g., 1,1,0,1 = 13, not 11 as expected)
This comment is hidden because it contains spoiler information about the solution
Is there a way to check a test input? My solution passes in 157 cases, it fails in 3 (expected results 8, 9, and 217). I don’t know why, hence I can’t debug. (Oh, I see, it is possible but I lose in fight bit!)