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

[014. Maximum Subarray]It's DP..not greedy.. #10

Closed
Mooophy opened this issue Apr 9, 2015 · 0 comments
Closed

[014. Maximum Subarray]It's DP..not greedy.. #10

Mooophy opened this issue Apr 9, 2015 · 0 comments
Assignees
Labels

Comments

@Mooophy
Copy link
Contributor

Mooophy commented Apr 9, 2015

Because of the way this algorithm uses optimal substructures (the maximum subarray ending at each position is calculated in a simple way from a related but smaller and overlapping subproblem: the maximum subarray ending at the previous position) this algorithm can be viewed as a simple example of dynamic programming.

From Maximum subarray problem on Wiki

@pezy pezy closed this as completed in f606c12 Apr 10, 2015
@pezy pezy self-assigned this Apr 10, 2015
@pezy pezy added the bug label Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants