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.
ineffecient
yeah sorry ,missed the word consecutive
you should add a break in the nested loop to help with efficiency
This comment is hidden because it contains spoiler information about the solution
Good thing this task isn't about performance :D.
it will reduce overall time taken as some test cases have empty lists.the code will end after executing 1st return if list is empty
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Exactly how I did it lol
This comment is hidden because it contains spoiler information about the solution
Cool!
Could be a problem a for a very big dataset since a loop inside a loop runs in square time.
Trying to make it come down to linear time is a good exercise!
Rather naive than smart. In this way you will go multiple times over the same word - which is not necessary.
This comment is hidden because it contains spoiler information about the solution
Loading more items...