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.
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
This comment is hidden because it contains spoiler information about the solution
This is cleaver but I don't think its best practice.
checking a string length after the loop is not very good. You may receive a string with thousands of symbols. Then iterate over it in the loop. An then you will discard all the work done because length is invalid
Oh, you're right! Didn't see that :)
Because he uses it outside the loop then. Try and see what happens, much better than ask for explanations ;)
This comment is hidden because it contains spoiler information about the solution
This program doesn't take into account strings with a leading plus sign though, like "+123".
This comment is hidden because it contains spoiler information about the solution
Not an issue.
Not a suggestion.
This comment is hidden because it contains spoiler information about the solution
Numbers from 0 to 9 are encoded 48 to 57 in the ASCII table.
This code will work fine except when you have very very big numbers.
e.g. imagine that the 53rd digit (i = 52) was 3. Well, ASCII of 3 is 51, which is less than 52.
Loading more items...