¡@

Home 

c++ Programming Glossary: fib_val

C++ Memoization understanding

http://stackoverflow.com/questions/12753979/c-memoization-understanding

fibHash.find n if fibIter fibHash.end return fibIter int fib_val if n 1 fib_val 1 else fib_val memoized_fib n 1 memoized_fib.. n if fibIter fibHash.end return fibIter int fib_val if n 1 fib_val 1 else fib_val memoized_fib n 1 memoized_fib n 2 fibHash n fib_val.. return fibIter int fib_val if n 1 fib_val 1 else fib_val memoized_fib n 1 memoized_fib n 2 fibHash n fib_val return fib_val..