Solutions relying on while (a[0]) should be caught out with zero values in the array. Testing could be better.
Also, it is not specified that values will be positive, only that they will be unique. Specifying that values will be positive or testing with zero and negative numbers would be better. ( It is not even specified that values are numerical. They might be strings; strings can be compared as well. )
After some try and error, I found that
kontti
is always split intoko
andntti
.The author should have explained that clearly.
Re-raised this as an issue.
lol
So many people doing it like this. Pretty crazy.
Thanks Alex, I appreciate that. I'm a big fan of KenKamau's Kata's, they always push me to write more efficient code. Happy coding!
The nicest solution i see here.
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
JavaScript, possibly others:
Solutions relying on
while (a[0])
should be caught out with zero values in the array. Testing could be better.Also, it is not specified that values will be positive, only that they will be unique. Specifying that values will be positive or testing with zero and negative numbers would be better. ( It is not even specified that values are numerical. They might be strings; strings can be compared as well. )
is fixed :) thx
Please refresh and try now. It should be OK.
Thanks B4B. I have made the changes.
I will wait to see if any more issues arise.
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
Loading more items...