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. That should hopefully make things clearer.
I've modified the tests to be more clear. I've enhanced existing ones and I've added a few negative tests as well.
I updated the description to be more clear. I've also enhanced the sample tests to help clarify.
I don't see why Random test cases are an absolute necessity.
I have improved the wording in the description to now say: "Numbers should preserve their sign; i.e. a negative number should still be negative when reversed." This should be clear enough.
This comment is hidden because it contains spoiler information about the solution
It does say "Negative numbers should be preserved."
Yes, unfortunatly I left this in draft status while some of the others were created and just published this without realizing there were several more. Some that previously existed were not sufficiently similar in my opinion to be considered duplicates (e.g. "Palindrome for your dome").
It means non-alphanumeric. A couple of the tests contain non-alpha characters.
Thanks to heyitsmattwade I realized the "trick" I missed; checking for c === 0.
I don't believe so, unless I'm misunderstanding how JS is behaving.
I intend to compute it once per function via: var sqrt_discrim = Math.sqrt(discriminant);
I then use the value of'sqrt_discrim' to compute both solutions; -b + sqrt_discrim ...
Without seeing the Test Cases, are there 5 that require the calculation of two real solutions? Am I missing a trick with one that would require me to not have to perform the sqrt() call?
Having issues passing the minimum allowed number of Math.sqrt() calls. It's telling me I have 5, but it needs to be 4 or less. I'm at an impass on how to reduce the problem further. My code passes all of the tests, except for this one. I am checking the discriminants first and only computing sqrt() for the case of two real solutions. I thought perhaps it was the case of sqrt(1) that may be uncessary and easily bypassed, however, that doesn't seem to be the case. I'm now stuck trying to figure out how to satisfy this black box's issue with having an extra sqrt() call. Any suggestions?