b**********5 发帖数: 7881 | 1 现在加的题, 连我都会做。 我最差的就是DP,u know, dynamic programming, not
the other DP... 多加点DP, 就更好了。 谢谢。 |
M********g 发帖数: 131 | |
l*n 发帖数: 529 | 3 leetcode的dp已经不少了。再增加,思路总还是一样的,毕竟dp的模式太固定了。
【在 b**********5 的大作中提到】 : 现在加的题, 连我都会做。 我最差的就是DP,u know, dynamic programming, not : the other DP... 多加点DP, 就更好了。 谢谢。
|
s****n 发帖数: 70 | 4 说句实话面试中问dp的真心不多,把常见的写熟就行了。还不如多做做树图相关的题目
,当然是个人经验
【在 b**********5 的大作中提到】 : 现在加的题, 连我都会做。 我最差的就是DP,u know, dynamic programming, not : the other DP... 多加点DP, 就更好了。 谢谢。
|
l****o 发帖数: 315 | 5 把最近那道fb的linkedlist的题目加进去吧。。。对操作linkedlist还是不够熟练,总
不能bug free |
a******e 发帖数: 710 | 6 请问是啥题目?
【在 l****o 的大作中提到】 : 把最近那道fb的linkedlist的题目加进去吧。。。对操作linkedlist还是不够熟练,总 : 不能bug free
|
h****g 发帖数: 105 | |
l****o 发帖数: 315 | 8 将1->2->3->4->5->6->7 变成 1->7->2->6->3->5->4,不能用额外空间
希望能加进去。
【在 a******e 的大作中提到】 : 请问是啥题目?
|
s********u 发帖数: 1109 | 9 感觉linkedlist用那个dummy node很好用
其实能用dp的题很多吧,只是有的太普通了看上去就只是一般的循环。
最近总结的:
e.g.1 Climbing takes n steps to reach to the top. Each time you can
either climb 1 or 2 or 3 steps. In how many distinct ways can you climb to
the top? ( CtCI 9.1 ,Leetcode: Climbing Stairs)
e.g.2 How many paths are there for the robot to go from (0,0) to (x,y) (
CtCI 9.2, Leetcode: Unique Path)
e.g.3 Write a method to return all subsets of a set. ( CtCI 9.4 )
e.g.4 Write a method to compute all permutations of a string. ( CtCI 9.5)
e.g.5 Letter Combinations of a Phone Number.( Leetcode: http://oj.leetcode.com/problems/letter-combinations-of-a-phone-number/)
e.g.6 Longest increasing subsequence of an array.( CtCI 11.7 )
e.g.7 Given the heights of each person in the circus, compute the
largest possible number of people in tower. ( CtCI 11.7)
e.g.8 Compute the Nth prime ( Ebay interview )
e.g.9 Given a string s and a dictionary of words dict, determine if s
can be segmented into a space-separated sequence of one or more dictionary
words. ( Leetcode: Word Break )
e.g.10 Generate a list of primes using The Sieve of Eratosthenes
这些我认为其实都是dp问题。 |