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.
the second test should be 5t? instead of 6?
Manual notification.
Without the conversion the lookup would be
O(n)
instead ofO(1)
.This comment is hidden because it contains spoiler information about the solution
anyone kind enough to explain the logic behind this?
This comment is hidden because it contains spoiler information about the solution
You can see your code will fail in any environment if the input is an empty string (it's one of the tests of the submit part) because your list will be empty and you're trying to access its last element. Catch those cases where your code fails and return the expected value.
Have you tested your code in those other environments with
''
as input? It'll fail too.Have you read the error message? It's says exactly why your code fails and which input is used.
A Question, not a kata issue, use markdown formatting so your code keeps indentation when posted here.
Hi, don't post code without the spoiler tag. It only passes the basic test. The complete tests include some edge cases you have to consider.
This comment is hidden because it contains spoiler information about the solution