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

Added DP problems #204

Merged
merged 2 commits into from
Dec 14, 2017
Merged

Added DP problems #204

merged 2 commits into from
Dec 14, 2017

Conversation

abhisheknalla
Copy link
Contributor

Thank you for your contribution. Please provide the details requested below.

ISSUE NUMBER

#117

SHORT DESCRIPTION

I added 4 DP problems

  • Rod Cutting Problem

  • Min Cost Path between vertices

  • Subset Sum

  • Ugly Numbers

I also added detailed explanation for the problem at hand and their algorithmic solutions.

TESTING

I added test case examples in the Readme files. Input prompts are added to avoid ambiguity.

int ugly[500];
ugly[0] = 1;
for (int i = 1; i < 500; ++i) {
ugly[i] = min(ugly[i2]*2, min(ugly[i3]*3, ugly[i5]*5));
Copy link
Member

Choose a reason for hiding this comment

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

document the code

@abhisheknalla
Copy link
Contributor Author

added comments

@prateekiiest prateekiiest merged commit 56b74e9 into codeIIEST:master Dec 14, 2017
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

2 participants