The test was in a loop but there was an undeclared variable in the test solution which was stomping on the loop counter. I fixed that so it's a private variable and the loop runs the correct number of times.
I'm not aware of any algorithms that can detect points of nondifferentiability in the general case. In any event, the point of the kata is to handle differentiable functions. I'll add that to the description.
I'd normally agree with you but, I did what you suggest in this kata: https://www.codewars.com/kata/remove-the-minimum/
People complain their code doesn't pass the mutation test anyway.
It's stated in the description:
This comment is hidden because it contains spoiler information about the solution
Yep you have to reverse the string. Actually GiacomoSorbi wrote the random test cases for me. What seems to be the issue?
Tests are updated.
I'll put some random test cases. Thx for the comment.
Good observation @TheDoctor. Thanks for your help and time to solve this kata. It's fixed. Your suggestions are welcome
The test was in a loop but there was an undeclared variable in the test solution which was stomping on the loop counter. I fixed that so it's a private variable and the loop runs the correct number of times.
No, those will only be approximately equal unless the derivative is a constant. They are approximating the derivative at two different points.
I'm not aware of any algorithms that can detect points of nondifferentiability in the general case. In any event, the point of the kata is to handle differentiable functions. I'll add that to the description.