Even though an issue on this subject (changing the name of a parameter from compare to key) was marked as resolved, I feel the Python translation needs a bit more work. The description still contains Javascript code which includes the line res = linkedSort(HowMany,Type,function(a,b){return a-b;}). This still misled me into thinking the key parameter would in fact be a two-parameter compare-style sorting function, (which I would need to use cmp_to_key on before using it with any built-in Python sorting functions).
It does not help that neither of the example tests have a custom sorting function, so there are no code examples to help demonstrate what sort of functions will be passed in.
Python: In the description it says: He told you that the sub function may or may not be here, if no sub-function return undefined, ...
The undefined part of sentence should be replaced by e.g. an empty string in Python
The description should probably state that the divisors are non-zero.
Tests don't even run correctly.
python new test framework is required. updated in this fork
Even though an issue on this subject (changing the name of a parameter from
compare
tokey
) was marked as resolved, I feel the Python translation needs a bit more work. The description still contains Javascript code which includes the lineres = linkedSort(HowMany,Type,function(a,b){return a-b;})
. This still misled me into thinking the key parameter would in fact be a two-parameter compare-style sorting function, (which I would need to use cmp_to_key on before using it with any built-in Python sorting functions).It does not help that neither of the example tests have a custom sorting function, so there are no code examples to help demonstrate what sort of functions will be passed in.
JS: Not enough fixed test cases. I have to guess the method signature of the comparison function.
Ruby 3.0 should be enabled.
Ruby 3.0 should be enabled.
The class name should be in PascalCase.
It's not mentioned that
gueZZ
may not receive an argument at all.This solution incorrectly checks for subfunction but still passes the tests.
This does not apply to all kata versions.
DEBUG
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...