Min Depth of Binary Tree

Given a binary tree, find its minimum depth.

The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.

NOTE : The path has to end on a leaf node.

Example :


min depth = 2.

Interview Code Editor
  • Solution Approach
  • Complete Solution
5835 successful submissions.
Asked In:
  • Facebook
  • Amazon
Click here to jump start your coding interview preparation