摘要: #include<stdio.h>#include<string.h>#include <pthread.h>#include <iostream>#include <algorithm>#include <vector>#include <stack>#include <stdlib.h>#inc 阅读全文
posted @ 2017-09-18 20:36 bananaa 阅读(120) 评论(0) 推荐(0)
摘要: class Solution { public: /* 对于一颗二叉树,从根节点开始遍历 如果左右节点有一个为NULL,那么肯定不是对称二叉树 如果左右子节点均不为空,但不相等,那么肯定不是对称二叉树 如果左右子节点均不为空且相等,那么: 遍历左子树,遍历顺序为,当前节点,左子树,右子树 遍历右子树,遍历顺序为,当前节点,右... 阅读全文
posted @ 2017-09-18 10:23 bananaa 阅读(598) 评论(0) 推荐(0)
摘要: #include #include #include #include #include #include #include #include #include using namespace std; struct TreeLinkNode { int val; struct TreeLinkNode *left; struct TreeLinkNode... 阅读全文
posted @ 2017-09-18 09:46 bananaa 阅读(203) 评论(0) 推荐(0)