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.
oh my god how i missed this.
Really cool.
😌😉
Cool trick!
Very clever solution, however efficiency wise not really the best.
You end up going through the full list twice as well as doing two index calls.
The idea of converting the list to one of True, False is clever. Mine worked, but it was ugly compared to this!
I think the solution with computing all numbers isn't fit for the production based on the performance issue.
I don't like to wait too long (even a nanosecond).
But I like to learn new 1-line codes.
@daimonji, I had the same thought but did not know how to implement it. In your code, 'if poss[c]' is always False as both values in poss are equal to 0. Can you explain?
@Haksell, correct.
This comment is hidden because it contains spoiler information about the solution
Yes, good idea. In my defence, I was not trying to come up with the absolute minimal solution when I wrote this.
This comment is hidden because it contains spoiler information about the solution
I also didn't understand why they aimed for booleans
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It does't change the fact, that variable name says nothing about stored content.
Loading more items...