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.
I guess it's better to just saying it in words: this loops over the input only once instead of 3 times :) – in the solution itself I did mention the correct time complexity of O(n) as a comment.
True. Is there another way to mention the difference?
O(3n) = O(n)
This is a O(n) solution, while all other solutions are O(3n). Thanks to Kevin, Ritu, David and Siemen for collaborating on this solution.
That feeling you get when you remember the XOR operator exists.
Thanks!
such a beautiful solution
This comment is hidden because it contains spoiler information about the solution
To keep a certain amount of exploration will make Kata more interesting. ;-)
However, I can't keep silent that the description itself is made interesting and tempting :)
Nice idea, but it is too many work.
I mean providing a map
{symbol : zerosCount}
manually is boring.You should add the list of testable characters at least. (I'm agree with somoza's comment)
This comment is hidden because it contains spoiler information about the solution
I think providing the map of what characters count as how many zeroes up-front would allow for a better experience.
Upvoting for best-practices because its one of the few solutions that loops only once over the input.
Upvoting for best-practices because its one of the few solutions that only loops once over the input.
Loading more items...