Find max depth of Binary tree

Problem Statement :

Given a binary tree find the max depth of Binary Tree.

Solution :

Height of binary tree defined as max path length from root to leaf node. if root  is NULL then height is defined as zero. Here we can apply recursive approach as maximum of height of left subtree and right subtree with +1 value of root node .


Click here to get binary search tree implementation code.