Write a function to find the depth of a binary tree.
int depth(treenode *p) { if(p==NULL)return -1 ; int h1=depth(p->left); int h2=depth(p->right); return(max(h1,h2)+1); } in case where p has no child but is not NULL itself, it should return 0.