Explore >> Select a destination


You are here

www.jeremykun.com
| | jeremykun.com
10.9 parsecs away

Travel
| | Hard to believe Sanjeev Arora and his coauthors consider it"a basic tool [that should be] taught to all algorithms students together with divide-and-conquer, dynamic programming, and random sampling."Christos Papadimitriou calls it"so hard to believe that it has been discovered five times and forgotten." It has formed the basis of algorithms inmachine learning, optimization, game theory,
| | www.oranlooney.com
11.4 parsecs away

Travel
| | A common example of recursion is the function to calculate the \(n\)-th Fibonacci number: def naive_fib(n): if n < 2: return n else: return naive_fib(n-1) + naive_fib(n-2) This follows the mathematical definition very closely but it's performance is terrible: roughly \(\mathcal{O}(2^n)\). This is commonly patched up with dynamic programming. Specifically, either the memoization: from functools import lru_cache @lru_cache(100) def memoized_fib(n): if n < 2: return n else: return memoized_fib(n-1) + memoiz...
| | qsantos.fr
8.8 parsecs away

Travel
| |
| | adsecurity.org
78.9 parsecs away

Travel
|