摘要:
No limit to transaction count, so it is a recursive sum calculation. Take care of boundary condition.class Solution {public: int maxProfit(vector &... 阅读全文
摘要:
"that are all of the same length" is the key. This statement makes everything much simpler. And, please take care that L may contain duplicated string... 阅读全文
摘要:
Since it is a "return all" problem, we can use DFS. But brutal DFS got a TLE. So pruning is required.I referred tohttp://fisherlei.blogspot.com/2013/1... 阅读全文
摘要:
My first solution was DFS - TLE. Apparently, DFS with TLE usually means DP.1D DP + Rolling Array:class Solution {public: bool wordBreak(string s, u... 阅读全文