Skip to content

Conversation

maxwell-aladago
Copy link
Contributor

Also reformatted parts of the original file.

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove legacy Python imports and add Python type hints.

Note that only the integer weights 0-1 knapsack problem is solvable using dynamic programming.
"""
from __future__ import print_function, division, absolute_import
Copy link
Member

@cclauss cclauss Aug 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo does not support legacy Python so these directives are not needed.

@cclauss cclauss self-assigned this Aug 18, 2019
Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Thanks! Please wrap line 2 so the file can be read on GitHub without left-right scrolling.

@cclauss cclauss merged commit 5d46a4d into TheAlgorithms:master Aug 19, 2019
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
…mal subset for the dynamic programming problem (TheAlgorithms#1139)

* function for the knapsack problem which returns one of the optimal subsets

* function for the knapsack problem which returns one of the optimal subsets

* function for the knapsack problem which returns one of the optimal subsets

* function for the knapsack problem which returns one of the optimal subsets

* function for the knapsack problem which returns one of the optimal subsets

* some pep8 cleanup too
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