摘要:
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; ... 阅读全文
摘要:
class Solution {public: int maxPathSum(TreeNode *root) { int s, m; dfs(root, s, m); return (m > s) ? m : s; } void d... 阅读全文