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 approach has a space complexity of O(n). There is a solution in O(1) though. Definitely not best practice.
Brute-force solution, runs in O(n^2). Don't do this please, use a hash map instead which runs in O(n). Please, this is important for everyone.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi, you need to use the spoiler flag when discussing code / methods / solutions. I have added the tag.
This comment is hidden because it contains spoiler information about the solution
very clever!
don't understand how this works, but looks nice
brackets are not needed but good solution nontheless.
Best solution!
Agree!
Thanks for the feedback! As I want to get used to writing Katas, this helps me alot! Will look into how to get random tests.
Duplicate kata, missing random tests.
What a legend!
this is so cool! thanks for showing that
Loading more items...