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.
you can view their solution by clicking on 'View Solution'
can you solve it by o(n) please?
No you cant do that, it would contain 0 and we dont want that
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Just a heads up:
Kata directions: "Do not mutate the input array/list." This solution mutates the input array.
The code will not work correctly for double digit scores. But this particular kata only tests for scores from 0 to 4 on each side.
This comment is hidden because it contains spoiler information about the solution
Lots of good variations for this simple question. But for my money, this is the easiest to read.
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 think @AndrewB31415 was suggesting that there is a different approach that doesn't require iterating through a string of the input (*see his solution). But if you use this approach then you do need to convert the input number to an iterable.
Yes, @Invisibleman. Python uses
None
, rather than null though.This comment is hidden because it contains spoiler information about the solution
Loading more items...