mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	国外版
This commit is contained in:
		
							
								
								
									
										34
									
								
								算法题(国外版)/binary-tree-inorder-traversal.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								算法题(国外版)/binary-tree-inorder-traversal.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
<p>Given the <code>root</code> of a binary tree, return <em>the inorder traversal of its nodes' values</em>.</p>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Example 1:</strong></p>
 | 
			
		||||
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg" style="width: 125px; height: 200px;" />
 | 
			
		||||
<pre>
 | 
			
		||||
<strong>Input:</strong> root = [1,null,2,3]
 | 
			
		||||
<strong>Output:</strong> [1,3,2]
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
<p><strong>Example 2:</strong></p>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
<strong>Input:</strong> root = []
 | 
			
		||||
<strong>Output:</strong> []
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
<p><strong>Example 3:</strong></p>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
<strong>Input:</strong> root = [1]
 | 
			
		||||
<strong>Output:</strong> [1]
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Constraints:</strong></p>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
	<li>The number of nodes in the tree is in the range <code>[0, 100]</code>.</li>
 | 
			
		||||
	<li><code>-100 <= Node.val <= 100</code></li>
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<strong>Follow up:</strong> Recursive solution is trivial, could you do it iteratively?
 | 
			
		||||
		Reference in New Issue
	
	Block a user