how to calculate the depth of binary tree