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.
Indeed ;). However the test is passed anyway since it check if the difference between your result and the expected result is < 1. But to properly answer the question (which is always better) you should indeed import math and apply the floor function to the result.
Not an issue.
impressive, we've solved it in the same way
Solutions like this make me think "wtf is this" but then make me appreciate and learn. Thanks!
This is what threw me off so hard on this solution. Author should designate whether this LinkedList is supposed to behave like a Stack or Queue.
the problem statement did not state that the case you described should return true. I think it's a safe assumption that the author only wanted a True to return if there was an exact match in the list, and false if there are only partial matches or no match at all.
Not sure how this is solvable in a mostly-random fashion without using Python's random library!
On my machine the python2 interpreter returns this as a float. Doesn't the problem statement call for an int?