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
It's so obvoius what you did, I used a do while loop but this is much smoother :)
This comment is hidden because it contains spoiler information about the solution
Lol I'm just realizing how mildly convoluted my answer was. This is certainly best practice right here solid answer
This comment is hidden because it contains spoiler information about the solution
Please explain what kind of math is behind this solution?
It's best practice to minimize time complexity in case you're dealing with large amounts of data someday.
This comment is hidden because it contains spoiler information about the solution
Such a cool solution , I am still a begginer , can someone please explain it to me ?
This comment is hidden because it contains spoiler information about the solution
I don't understand why many have commented that this solution is slow... I also compared their solutions, but this is actually faster or about the same... or is there something I'm not considering?
Because of the array zero based indexing.
Nice, short solution! However could someone clarify why n-1?
time complexity is not look good
Loading more items...