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.
Issue unclear.
No, the ROT13 alphabet just displaces all characters in the regular alphabet by 13 places: "NOPQRSTUVWXYZABCDEFGHIJKLM"
Function name fixed.
im also having this exact problem, can you shed any light on it? using java
Good work!-)
This comment is hidden because it contains spoiler information about the solution
Could you post exactly between 3 backticks the test?
Well as the problem was just to return only one winner, I just evicted duplicates, which doesn't allow the other problem where you would want to return an ordered list of "winners" (?)
If that was the case, I would obviously choose another method to keep my results ordered (maybe an
OrderedDict
like you did)scores
only store the first candidate for each total score when iteratingcandidates
, which is ordered, and so the order is "preserved" as I evict all duplicates (look at thesetdefault
method usage)Maybe I shouldn't have used a dictionnary for this and just stored a
winner
variable updated when seeing a candidate with a better score, this would have been easier to read I think.Second point in the description:
You function needs to have default for the second argument as some of the tests would be like
prefill(n)
.Of course, in python,
None
would be used instead ofundefined
as the default argument.I am confused about this too. It would be useful to see the test case.
Thanks!
In Python, it is even a built-in feature.
The rot13 just means an alphabet with 13 letters in it. This test tests your code for the following note in the description:
-The function must work for any arbitrary alphabets, not only the pre-defined ones.
@re4lfl0w: I thank you for all your kind answers that I appreciate very much! I think I will not change the description because:
first - one shouldn't think from the example in "corrected order" that the arrays
a
andb
will always be given sorted in the tests.second - one must understand that
same
in the description doesn't mean==
.11
ina
in kind ofsame
as11 * 11
in
b
but they are not==
, etc... It's clearly said in the first sentence of the description thatI hope that everything is now clear for you. Don't worry about this "accident"! It happens that sometimes people don't measure the weight of their words. Good luck!
Loading more items...