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.
This kata is tagged as
puzzle
for a reason :)yes, definitely.
.
Done ✔️
Yikes
Yes.
This is a very clever solution!
Says programmer who uses
list.index
twice which searches element from the start and also isO(n)
if the element isn't found in list (which is common case here). Moreover he: wastes time for handing exceptionsn
times in worst case, uses backslash continuation, uses if expression like conditional block and writes hard to read code.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Yeah, I love a good old one-liner; and thank you for teading my code :)
The term is used in distributions in science and statistics. It's used to describe your score on the SAT / GRE / GMAT for instance.
I don't know how to add comments after the fact, but lose311 was correct in his/her explanation. We know that, if the sides represent a triangle, the sum of the smaller two must be greater than the largest side. So we reassign our variable names from smallest to greatest, and return whether or not the sum of the two smaller is indeed greater than the largest. Hope this helps.
Less clear and also 3 times slower than your solution :P
Glad you like it :)
Loading more items...