Tap here to switch tabs
Problem
Submissions

Problem: Binary Tree Inorder Traversal

Binary Tree Inorder Traversal asks you to return the values of a given binary tree in left subtree, node, and right subtree order.

Statement

Given the root of a binary tree, return the inorder traversal of its nodes’ values.

Follow up: A recursive solution is trivial. Could you solve it iteratively?

Constraints:

  • The number of nodes in the tree is in the range [0,100][0, 100].

  • −100≤-100 \leq Node.val ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Binary Tree Inorder Traversal

Binary Tree Inorder Traversal asks you to return the values of a given binary tree in left subtree, node, and right subtree order.

Statement

Given the root of a binary tree, return the inorder traversal of its nodes’ values.

Follow up: A recursive solution is trivial. Could you solve it iteratively?

Constraints:

  • The number of nodes in the tree is in the range [0,100][0, 100].

  • −100≤-100 \leq Node.val ≤100\leq 100