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.
consider using set (hashset ) lookup is better (o(1)) vs o(n) in lists ).
you are right ,it would be better to mainatin a hashset of elements already seen , why hashset ( because the lookup ( elemetn in set) complexity is o(1)
This comment is hidden because it contains spoiler information about the solution
it shows an error regarding tests ( possible lossy conversion form long to int) while the method signature clearly requires array of long to be returned
nice , but you can do it at once by using [0-9];
hashset adds only unique elements , you dont need to check if the element is present before adding.
there is a StringBuilder.repeat method , you can repeat the string you want and append it to the string builder
This comment is hidden because it contains spoiler information about the solution