Minimum Depth of Binary Tree Problem

Minimum Depth of Binary Tree Problem — ExecCode Easy DSA Practice

Solve the Minimum Depth of Binary Tree problem on ExecCode. Free online easy DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Minimum Depth of Binary Tree. BFS first leaf. For Minimum Depth of Binary Tree, focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.

Examples

Input root = [3, 9, 20, null, null, 15, 7]; Output 2

Constraints

0 ≤ nodes ≤ 10^4

Practice Minimum Depth of Binary Tree free on ExecCode. Browse DSA problems, topic map, and placement guides.