Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.
If the last word does not exist, return...
分类:
其他好文 时间:
2015-07-15 15:08:18
阅读次数:
97
Unique Paths II
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 res...
分类:
其他好文 时间:
2015-07-15 15:05:17
阅读次数:
104
Brutal-force solution is not hard to think about. But linear space input usually indicates O(n) DP solution.State design: dp[i]: total sum until index...
分类:
其他好文 时间:
2015-07-15 14:45:05
阅读次数:
97