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

LeetCode DP #8

Open
zxw018018 opened this issue Sep 15, 2018 · 0 comments
Open

LeetCode DP #8

zxw018018 opened this issue Sep 15, 2018 · 0 comments

Comments

@zxw018018
Copy link
Owner

LeetCode Dynamic Programming

Problems

279. Perfect Squares

Description

  • Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.

Analysis

  • Find the rule behind each number: min(dp[i], dp[i-j*j]+1)
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

No branches or pull requests

1 participant