Skip to content

Fixed while condition check in {Algorithm/Knapsack} #87

Merged
phishman3579 merged 1 commit into
phishman3579:masterfrom
aniders:patch-1
Feb 22, 2018
Merged

Fixed while condition check in {Algorithm/Knapsack} #87
phishman3579 merged 1 commit into
phishman3579:masterfrom
aniders:patch-1

Conversation

@aniders

@aniders aniders commented Feb 14, 2018

Copy link
Copy Markdown
Contributor

Changed OR condition to &&, OR may possibly result in ArrayIndexOutOfBoundException , (as it does for following input capacity : 60, weights: [10, 20, 33], values: [10, 3, 30])
Expected output is [2, 0]

By submitting this pull request I confirm I've read and complied with the below requirements.

  • I have read the Contribution guidelines and I am confident that my PR reflects them.
  • I have followed the coding guidelines for this project.
  • My code follows the skeleton code structure.
  • This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.

Changed OR condition to &&, OR may possibly result in ArrayIndexOutOfBoundException , (as it does for following input capacity : 60, weights: [10, 20, 33], values: [10, 3, 30])
@phishman3579 phishman3579 merged commit e6ff7a8 into phishman3579:master Feb 22, 2018
@aniders aniders deleted the patch-1 branch February 27, 2018 14:14
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.

2 participants