# Binary Tree Inorder Traversal LeetCode Solution

## Binary Tree Inorder Traversal LeetCode Solution :

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

## Binary Tree Inorder Traversal LeetCode Solution :

### Constraints :

•  The number of nodes in the tree is in the range [0, 100].
• -100 <= Node.val <= 100

Example 2:

• Input: root = []
• Output: []

## Approach for Binary Tree Inorder Traversal LeetCode Solution :

2. Recursively traverse the left subtree, adding its values to the result.

3. Add the value of the current node to the result.

4. Recursively traverse the right subtree, adding its values to the result.

5. Return the result vector, which now contains the values of the binary tree in ascending order due to the inorder traversal.

### Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

## Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others