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.
not the most efficient solution, since you will need to expand the slice as it fills up. imagine like 1 000 000 elements to reverse
iterating over arr each time is not the best practice imo
JVM will optimize it and place the length of the string as it is not changed during the iterations
why do you import Arrays and Collections if you don't even use them?
you are calling "str.length()" method each time you iterate
yeah wtf haha
This comment is hidden because it contains spoiler information about the solution