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.
Removing from
ArrayList
takes a cost and it is overkill for this.This is why math is important for programming!
This is way better than using a for loop.
"...removes all exclamation marks..."
writing loops only to realise could've done just simple maths
Gauss would be proud! What a code.
nice choose
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Beautiful solution!
Congrats!
This solution has a time complexity of O(n^2) in the worst case scenario, where n is the length of the input string.
This is due to the use of the contains() method, which loops through the remaining substring to check if a character appears more than once.
In the worst case scenario, this will cause the loop to be repeated n times, resulting in O(n^2) time complexity.
shouldn't have slept in primary school. Took calculator for verification :-)
It's really clever, but slowly. It takes for 2 time longer than solution with for loop.
you are clever!
Sorry, it really does work :(
Loading more items...