摘要: https://leetcode.com/problems/binary-tree-paths//** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * ... 阅读全文
posted @ 2015-12-08 16:24 阿怪123 阅读(98) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/implement-stack-using-queues/class Stack {public: queue q1,q2; // Push element x onto stack. void push(int x) {... 阅读全文
posted @ 2015-12-08 16:06 阿怪123 阅读(104) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/path-sum-ii//** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * Tree... 阅读全文
posted @ 2015-12-08 15:31 阿怪123 阅读(116) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/path-sum/使用递归的方法/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * ... 阅读全文
posted @ 2015-12-08 15:02 阿怪123 阅读(110) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/plus-one/class Solution {public: vector plusOne(vector& digits) { int size=digits.size(); vector::itera... 阅读全文
posted @ 2015-12-08 00:35 阿怪123 阅读(132) 评论(0) 推荐(0)