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.
Good one :D
kinda clever but it also has super shitty readability. I'd rather stay with some longer yet simpler solutions to this problem.
waw, i was trying to do this exact same thing, just learned something new.
The [0] at the end of the list comprehension selects the first element of the filtered list.
you're using syntax that only works in list comprehension without defining it as a list. you need the square brackets and even then you have to only return the first instance of x.
thats what i did
Beautifully done
what mean a last [0] in 2nd line?
I like how easy this is to read, compared to the others I've seen so far.
this was my goal, unfortunately I was too tired to achieve it
This comment is hidden because it contains spoiler information about the solution
sure
Thank you for the feedback hobovsky. Could I ask you to clarify a couple points? What makes this algorithm overly complex? I'm also curious where I can read more about what a O(n) solution might be. Thanks in advance!
Actually it does not really matter if this solution runs few ms slower or faster. It has unneccesarily high complexity and will always be slower than O(n) solution.
Thank you so much for the very helpful reply - it's greatly appreciated!
Loading more items...