Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fd82953

Browse files
committed
DOCS Added documentation to FastFib method
1 parent f2072a0 commit fd82953

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/PracticeAlgorithms.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public static long Fib(int N) {
1616
return Fib(N - 2) + Fib(N - 1);
1717
}
1818

19+
// dynamic programming and memoization
1920
public static long FastFib(int N, HashMap<Integer, Long> cache) {
2021
if (N == 0) {
2122
cache.put(N, 0L);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /