- 博客(3)
- 资源 (3)
- 收藏
- 关注
原创 leetcode100. Same Tree
easy程度题Q:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 判断两个二叉树是否
2017-05-20 16:34:24 293
原创 leetcode101. Symmetric Tree
Q:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric:1 / \ 2 2 / \ / \ 3 4 4 3But the
2017-05-20 16:17:18 335
转载 Morris二叉树遍历算法
Morris二叉树遍历算法 时间复杂度O(N),空间复杂度O(1) 这种方法借鉴了线索化二叉树的思想,但是不占用空间中序遍历方法如下: 如果当前节点的左孩子为空,则输出当前节点并将其右孩子作为当前节点。 如果当前节点的左孩子不为空,在当前节点的左子树中找到当前节点在中序遍历下的前驱节点。a) 如果前驱节点的右孩子为空,将它的右孩子设置为当前节点。当前节点更新为当前节点的左孩子。b) 如果前驱节点
2017-05-19 23:36:16 318
教学计划编制
2017-06-03
数据结构课程设计——教学计划编制(极其详细)
2017-06-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人