摘要: 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 新一代的天皇巨星 阅读(163) 评论(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 新一代的天皇巨星 阅读(148) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { System.out.println(GetInsertLocation(new int[]{0,2},-1)); System.out.println(GetInsertLocati... 阅读全文
posted @ 2015-01-11 04:40 新一代的天皇巨星 阅读(137) 评论(0) 推荐(0)
摘要: Suppose you are a fan of auto-racing and want to figure out which drivers are likely to perform well in an upcoming race. Luckily you have access to a... 阅读全文
posted @ 2015-01-11 04:38 新一代的天皇巨星 阅读(440) 评论(0) 推荐(0)