- Notifications
You must be signed in to change notification settings - Fork180
Integer partition#24
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
returns the wrong total for some values of ne.g. when n is 6 returns 14 instead of 11This more closely resembles the code from referenced in the README:https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/math/integer-partition
on some values it would print wrong partitionse.g. when n is 6 [3,3,1] is printed but is not a valid output
Thanks for the fix! |
gifTa4gupzawkikwaq left a comment
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.
gifTa4gupzawkikwaq left a comment
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.
gifTa4gupzawkikwaq left a comment
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.
gifTa4gupzawkikwaq left a comment
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.
this is a fix to the issue #284 detailed here:
algorithm-visualizer/algorithm-visualizer#284
It also had errors with the matrix which have been fixed. The code more closely resembles the code referenced in the README.
https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/math/integer-partition
I tried to keep the code as similar to the original as possible.
here are some screenshots of the errors.


before:
after: