Function to calculate the minimum depth of the tree
int minimumDepth ( Node * root , int level ) { if ( root == NULL ) return level ; level ++ ; return min ( minimumDepth ( root -> left , level ) , minimumDepth ( root -> right , level ) ) ; }