Tree101SymmetricTree
2016-09-06 03:01
211 查看
Pre-defined Methods
LinkedList思路
镜面复制左边tree,直接和右边用Tree100SameTree比较直接每level比较,但左边tree会在enqueue的时候颠倒左右顺序,从而和镜面对应位置的右边tree比较
第一遍做完一个test没有pass
[] 忘记考虑root为null的情况
Tricks总结
If no need to store the mirrorTree, don’t need to build the helper MirrorTree(). But as practice, we can write one.If the first node in the Queue is not Root, but
Root.leftor
Root.right, we need to consider
Root == null
相关文章推荐
- AVL树-自平衡二叉查找树(Java实现)
- 命令行快速技巧:如何定位一个文件
- jquery+CSS实现的多级竖向展开树形TRee菜单效果
- C语言二叉树的非递归遍历实例分析
- 使用C语言构建基本的二叉树数据结构
- 一波二叉树遍历问题的C++解答实例分享
- 举例讲解C语言程序中对二叉树数据结构的各种遍历方式
- C++非递归队列实现二叉树的广度优先遍历
- PHP实现的线索二叉树及二叉树遍历方法详解
- C#使用前序遍历、中序遍历和后序遍历打印二叉树的方法
- cmd tree命令 以树形格式罗列文件
- 无限分级和tree结构数据增删改【附DEMO下载】
- 实例讲解jQuery EasyUI tree中state属性慎用
- 推荐8款jQuery轻量级树形Tree插件
- tree 以树形格式罗列文件
- EasyUI Tree+Asp.net实现权限树或目录树导航的简单实例
- E3 tree 1.6在Firefox下显示问题的修复方法
- js树形控件脚本代码
- C#非递归先序遍历二叉树实例
- C++将二叉树转为双向链表及判断两个链表是否相交