摘要:
简单DFS/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {public: void dfs(TreeNode* root , int sum , vector >& ans , vector& tmp) { if(root == null... 阅读全文
posted @ 2014-01-14 22:05 1957 阅读(160) 评论(0) 推荐(0) 编辑