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.
Done.
Ia agree with
dfgwze
.The final test is confusing and wrong now.
Should be
test.assert_equals(db_sort(["Apple",46,"287",574,"Peach","3","69",78,"Grape","423"]),[46,78,574,"287", "3","423", "69","Apple","Grape","Peach"])
People will fall off their chairs trying to read that.
this is not information. you mean to say that strings should be sorted lexicographically - say that instead.
it might be supposed to be helpful in pointing out that
'123'
is a different value from123
but that's not what it says. if you're going to be helpful, be clear and correct.it's also javascript specific, nobody else would ever mix these up.
I propose the following replacement description:
javascript test output is poorly / inconsistently quoted. example:
Please prefer to format them such that they can be evaluated to obtain the original value.
Agreed. Alphabetical sort for numbers will not work in test case witch is missleading when reading the subject.
Attempt cases doesn't include a test case similar to last test case in which numbers are as strings. So even if that constraint hasn't been met succesfully, still we can pass the Kata. So, the Attempt cases should includesuch test cases as well.
Kata was good! I just felt that nb(25,1) example caused a bit of confusion. I understand that its been stated 'numbers of interest', but it would be better if all the numbers would have listed and then counting no. of d from their squared forms.
Please provide bit more detail regarding the mathematics behind it as in why water * 1.1 ^ (clothes - load).
Hope this helps!
In the second para of the description, clothes and load should be interchanged. That's the major edit needed.
I got the same issue, just simplify your nested loops to bring down the complexity.
In some of the python versions, str.maketrans won't work. In those instances, import string and then use string.maketrans