-
-
Notifications
You must be signed in to change notification settings - Fork 46.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #12510 #12514
Fix #12510 #12514
Conversation
@XenoBytesX Can you please describe where the error was in the current implementation and why it had to be completely rewritten? I expected that perhaps a minor change to the current implementation would be enough Additionally, please add a doctest from issue
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comment above
The current code was failing the testcase mentioned in the issue #12510. The current code was difficult to understand and comparatively slower to what i have implemented. I have added the doctest and commited it to the pull request. |
I know that current implementation fails some tests (I am author of issue). But I expect that such bugs should be fixed in following way - understand current implementation and fix it (often with fairly minor and simple changes) or write some thoughts why current implementation is very incorrect and cannot be fixed in this way and only then reimplement it You can add your non-recursive implementation as different separate implementation for solving this problem, but when solving this issue I expect a different approach P.S. This repository is not about fastest implementations, it is about different implementations of algorithms or to solve problems. So, if we can have two different implementations to solve same problem - it is better to have them both instead of only one - the fastest of them. In this particular case I think that current recursive implementation is also quite important |
Ok, Understood. I will close this PR and open a new PR for fixing the bug and an another seperate PR with the new implementation. Thanks |
Describe your change:
Checklist: