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.
Any prime close to max value of int will cause this solution to timeout.
This solution will not work properly in case of int overflow.
I am disappointed with this website ... it teaches to write inefficient and incorrect code
This solution is too slow anyway (if we are talking about performance) to bother about such minor optimization at all.
Will this solution still work for tests where words are separated by more than one space?