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.
Duplicate.
Imarked this issue as solved. Thank you Giacomo.
Fixed the description, what about now?
Actually it would be better to use
.sort((a, b) => +a - +b)
, but my mistake, I will see to fix it.Too easy
For the Javascript version message @GiacomoSorbi.
by default Array.sort() converts array elements to strings then sorts alpha-numerically
if you supply it with a function it will use that function to do the sort instead
to sort Numerically from smallest to largest use
.sort((a, b) => a-b)
If you replace
.sort()
in the test cases with.sort((a, b) => a-b)
then the test cases will expect numerically sorted resultsIn javascript at least the order is based on a string sort. This seems very unintuitive for a math based problem. with a string based sort some times the smaller number is first other times the larger number is first
ex.
24.01 is before 3.01
but 3.01 is before 4.01
Since for a math based problem I would normally expect to sort results numerically, I think you should explicitly state that results are sorted by their string reresentation or change it to sort numerically
It's given in the details. It's easy to deduce it,
sec_deg_solver(a, b, c) == Two solutions: -0.7403124237, 0.5403124237
This comment is hidden because it contains spoiler information about the solution
Thanks !
The fourth test case checks "scriptjavx" and "javascript".
But in general you can just print the arguments in the function to see what arguments your function fails on.
I don't understand, my code passes all the test in the testCase but when I want to submit it, it fails to pass the fourth test.
And I don't know why because it's only written that it should have returned False... Is it possible to know what tis test is ?
I'm using Python
The description could be better : the example is not enough to understand as quick as it should be.