题目简介:
给定一个二叉树,返回它的中序 遍历。
示例:
1 | 输入: [1,null,2,3] |
进阶: 递归算法很简单,你可以通过迭代算法完成吗?
思路:
先用递归做着,以后补迭代做法(将栈显示的表达出来)。
代码如下:
1 | /** |
给定一个二叉树,返回它的中序 遍历。
示例:
1 | 输入: [1,null,2,3] |
进阶: 递归算法很简单,你可以通过迭代算法完成吗?
先用递归做着,以后补迭代做法(将栈显示的表达出来)。
1 | /** |
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: true
tags: true