“二叉树的中序遍历”的版本间的差异
来自qingwei personal wiki
(创建页面,内容为“== 描述 == === leetcode === https://leetcode-cn.com/problems/binary-tree-inorder-traversal/description/<br /> https://leetcode.com/problems/binary-tree-inorder-tra…”) |
|||
第1行: | 第1行: | ||
+ | == 中序 == | ||
+ | <pre> | ||
+ | 中序遍历首先遍历左子树,然后访问根结点,最后遍历右子树 | ||
+ | |||
+ | 相对于根来说,中序指 根 中间次序访问 | ||
+ | 先序指 根 首先访问 | ||
+ | 后续指 根 最后访问 | ||
+ | </pre> | ||
== 描述 == | == 描述 == | ||
=== leetcode === | === leetcode === |
2018年5月28日 (一) 14:35的版本
中序
中序遍历首先遍历左子树,然后访问根结点,最后遍历右子树 相对于根来说,中序指 根 中间次序访问 先序指 根 首先访问 后续指 根 最后访问
描述
leetcode
https://leetcode-cn.com/problems/binary-tree-inorder-traversal/description/
https://leetcode.com/problems/binary-tree-inorder-traversal/description/
问题
给定一个二叉树,返回它的中序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,3,2]