Skip to main content

🟩 Binary Tree Inorder Traversal (#94)

📋 Problem Statement​

You are given the root of a binary tree, return the inorder traversal of its nodes' values.

💡 Examples​

Example 1​

Binary Tree Inorder Traversal Example 1

Input: root = [1,2,3,4,5,6,7]
Output: [4,2,5,1,6,3,7]

Example 2​

Binary Tree Inorder Traversal Example 2

Input: root = [1,2,3,null,4,5,null]
Output: [2,4,1,5,3]

Example 3​

Input: root = []
Output: []