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.
Here you sort ALL the 50 millions element and after you had to compare the digit (not linear for sur).
But all you have to do is to look element by element and find the first one who is not asc (linear).
Sorry for my english
perfect
Probably it's the most fastet solution. Can you explain please why do you think that this solution is slow?
test on a list of len 50 millions
your decision took time: 2.390636682510376
supposedly slow decision took time: 1661070264.348622
your decision longer on 1.7343978881835938
slower than necessery, and you kind of loose all the interest of the kata ?
I doubt any 7-kyu user cares about that. Might be an issue in production, though.
shot but slow
concise, easy to understand, but asymptotically slow (N log N vs N)
classe
Did you ever figure it out? Could you possibly explain it to the rest of us what this problem is asking for?
You aren't getting false instances. Take a look at the words closely. There is a twist to the kata.
I'm trying this in python and am having trouble getting the learned words list to clear in between test cases. As a result I return false instances of 'already know this word' when the list should have been cleared. Can anyone point me in the right direction to get the list cleared inbetween test cases?
I'm using python and cannot figure out how to get the list i'm using to store the words when the add word function is called and as a result I keep getting false Trues when the list should have been reset for the next test case. Can anyone plesae give me a tip as to how I would clear the list in between test cases so I don't return false positives?
You are not misunderstanding the ask. In which language you're coding?
If I understand the challenge - we want to return how many cubes would not be visible. So for example in the test case of 4 there are 64 blocks (4 width X 4 height X 4 deep) and 8 of those cubes would fall in the interior not visible from the outside. If that is accurate I'm getting an error on the test case of 15 - the test case said I should get an answer of 27, which is way too low for a 15 X 15 X 15 cube.
Can anyone help me understand where I am misunderstanding the ask?