Created
February 3, 2020 04:23
-
-
Save andriybuday/434658e88ef09dc7e764e1690a56fa53 to your computer and use it in GitHub Desktop.
Dynamic Programming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[] dp = new int[n]; | |
dp[0] = // something that makes sense for initial value | |
for(int i = 1; i < n; ++i) { | |
dp[i] = // some way to get value using dp[i-1] | |
} | |
return dp[n-1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment