Perl Weekly Challenge 151: Binary tree Depth
These are some answers to the Week 151 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Task 1: Binary Tree Depth
You are given binary tree.
Write a script to find the minimum depth.
The minimum depth is the number of nodes from the root to the nearest leaf node (node without any children).
Example 1:
Input: '1 | 2 3 | 4 5'
1
/ \
2 3
/ \
4 5
Output: 2
Example 2:

