随笔分类 -  Dynamic Programming

摘要:Problem: You have a n x n grid: 2 4 3 1 3 2 1 4 4 2 3 1 1 2 3 4 You have to start at the bottom row (highlighted red) and make your way to the top row 阅读全文
posted @ 2016-03-12 09:12 新一代的天皇巨星 阅读(308) 评论(0) 推荐(0)
摘要:DP = Recursion + Memoization, A Smart Brute-force Algorithm Divide the original problem into similar subproblems. Hard desgin part: what are the subpr 阅读全文
posted @ 2015-01-11 12:58 新一代的天皇巨星 阅读(166) 评论(0) 推荐(0)
摘要:Preamble: Fibonacci Series: If n = 0: return 0;If n<=2: return 1;return f(n-1)+f(n-2) Time Complexity: It's the Fibonacci Recurrence function. T(n) = 阅读全文
posted @ 2015-01-11 12:49 新一代的天皇巨星 阅读(149) 评论(0) 推荐(0)