摘要: class Solution {public: vector findSubstring(string S, vector &L) { vector res; unordered_map stat; unordered_map run; int len = S.size(); int num = L.size(); int per = 0; if (num == 0 || !(per = L[0].size())) return res; int part= num * per; if (part > len) return res; ... 阅读全文
posted @ 2014-03-22 14:41 卖程序的小歪 阅读(328) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int maxPathSum(TreeNode *root) { int s, m; dfs(root, s, m); return (m > s) ? m : s; } void d... 阅读全文
posted @ 2014-03-22 01:26 卖程序的小歪 阅读(270) 评论(0) 推荐(0) 编辑