Skip to content
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

Ktrongnhan fix for 248 #338

Closed
wants to merge 4 commits into from
Closed

Ktrongnhan fix for 248 #338

wants to merge 4 commits into from

Conversation

ktrongnhan
Copy link

Hello @trekhleb
I am submitting a fix for issue #248. Hope you could spare a minute to have a look at it. Any comment would be appreciated.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The current method of finding a complete solution to 0/1 knapsack problem has many flaws in it. I find it more elegant to use an auxiliary matrix whose elements e[i, j] are determined by a simple rule: e[i, j] := true if taking item[i] solves the subproblem knapsack(item[0..1], j) where j denotes a capacity; otherwise e[i, j] := false

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@codecov
Copy link

codecov bot commented Apr 15, 2019

Codecov Report

Merging #338 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #338   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         149    149           
  Lines        2612   2607    -5     
  Branches      434    432    -2     
=====================================
- Hits         2612   2607    -5
Impacted Files Coverage Δ
src/algorithms/sets/knapsack-problem/Knapsack.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94abfec...73c1e25. Read the comment docs.

@ktrongnhan ktrongnhan requested a review from trekhleb January 26, 2020 15:23
@ktrongnhan ktrongnhan closed this by deleting the head repository Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant