码迷,mamicode.com
首页 >  
搜索关键字:动太规划    ( 2个结果
Interleaving String -- leetcode
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbbaccc", ret...
分类:其他好文   时间:2015-05-03 12:06:25    阅读次数:179
Climbing Stairs -- leetcode
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 此题用动太规划解决。 递归式为:dp[n] = dp[...
分类:其他好文   时间:2015-04-09 08:49:52    阅读次数:104
2条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!