摘要:
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cla... 阅读全文
posted @ 2018-12-03 13:43
JTechRoad
阅读(76)
评论(0)
推荐(0)
摘要:
class Solution { public: vector path; unordered_map> m; vector findItinerary(vector> tickets) { for (auto &p : tickets) m[p.first].insert(p.second); dfs("JFK")... 阅读全文
posted @ 2018-12-02 07:41
JTechRoad
阅读(94)
评论(0)
推荐(0)
摘要:
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cla... 阅读全文
posted @ 2018-12-02 07:40
JTechRoad
阅读(73)
评论(0)
推荐(0)
摘要:
class Solution { public: int calPoints(vector& ops) { vector v; for (auto &s : ops) { if (s == "+") { v.push_back(v[v.size()-1] + v[v.size()-2]); ... 阅读全文
posted @ 2018-12-01 17:06
JTechRoad
阅读(88)
评论(0)
推荐(0)
摘要:
class Solution { public: string solveEquation(string equation) { int idx = equation.find('='); int x1 = 0, v1 = 0, x2 = 0, v2 = 0, idx1 = 0, idx2 = 0; helper(equa... 阅读全文
posted @ 2018-12-01 15:07
JTechRoad
阅读(100)
评论(0)
推荐(0)
浙公网安备 33010602011771号