Skip to content

Instantly share code, notes, and snippets.

@akshat-fsociety
Created August 12, 2021 08:06
Show Gist options
  • Save akshat-fsociety/3325322d5e1935608d21f598a210241a to your computer and use it in GitHub Desktop.
Save akshat-fsociety/3325322d5e1935608d21f598a210241a to your computer and use it in GitHub Desktop.
public int fibo(int n){
dp[0] = 0;
dp[1] = 1;
for(int i=2; i<=n; i++){
dp[i] = dp[i-1] + dp[i-2];
}
return dp[n];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment