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.
I second that
Is it just me or the Random Tests do not match the format of the Sample Tests?
No point in giving away the formula for calculating the two volumes in initial solution setup
Description should be language-agnostic
Function name in description is wrong
I have a solution which passes the random tests about 50% of the time, and the other 50% returns:
expected NaN to be close to NaN +/- 1e-9
?yep
I have worked on it accordingly now. Hope this resolves the issue.
but the idea was to not round at all, and use a margin like 1e-9. You can invalidate previous solutions, that's not a problem.
I have worked on it now. Hope this resolves the issue.
I have used
assert.approximately
to fix the issue.I have created a separate function now that checks the output elements individually and have used
assert.approximately
in case of the rounded output. Is it okay now? if you could please verify.I have solved the issue with the random cases sir.
that's why I said to test sepcifically the last element of that array, that way. You need a custom assertion function, that tests separately the two elements.
assert.approximately
only works for numbers though; whereas my function requires an array output. Could you please suggest me an alternate possible solution?you cannot install packages on CW and I'm not sure that one is available. But you can use
assert.approximately
from the available chai package.Alright! I'll work on it right away
Loading more items...