You need to sign in or sign up before continuing.×
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.
I would also be interesting in seeing a test in which this solution fails.
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
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
This is the only O(N) solution. Good job.
.pop(0)
on a list is really expensive because it requires the array to shift left, an O(n) operation. It would be better to use acollections.deque
which can pop the left most item off in O(1) time.This comment is hidden because it contains spoiler information about the solution
Did you ever find the solution to this issue? Would you mind providing me a hint?
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
Aside from the formatting, this was great.
Loading more items...