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.
It uses the Triangle Inequality Theorem that says to be a triangle, the smaller two sides must add up to be larger than the third side. By sorting the list of three sides, it guarantees that a and b are the smaller sides, and c is the largest.
I could be wrong, but since the probabilities are floats, they won't always add up to exactly 1.
Need to define how to sort if the counts are the same for two different characters.
And lexigraphically,
#
is less than_
, so left version should be correct.You should specify that you need to return the correct answer after finding it. Also that
guess_number
is part of the classguess_bot
or maybe renameguess_number
so the method and the function aren't called the same thing. Maybe something likeask_bot
This comment is hidden because it contains spoiler information about the solution
Description says to use 'sean' if word is lowercase, but it should be 'Sean' according to test cases.
This comment is hidden because it contains spoiler information about the solution
Done.
Usually a syntax error means you missed a parentheses or something on the previous line. Check the parens on the last line of your code.
It looks like a PHP-stye associative array: http://php.net/manual/en/language.types.array.php
Similar to Python's dict, just different syntax:
Is a dict of lists.
I'm sure this has been mentioned, but you should make a note of program runtime for every solution and list it. Doesn't have to be a competition, but it would be nice to see which methods are faster, as speed is always a consideration.
Need a couple with hypens at beginning and end:
More test cases, so name can't start or end with
-
, and maybe can't have upper-case letters anywhere but first letter of new word.You should specify that the global
league_table
needs to be changed in place, and it isn't enough to return the updated one. I was trying to keep my solution short and return a list comprehension, but I had to updateleage_table
first:Instead of just
Loading more items...