Guest User

Untitled

a guest
May 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. typedef struct TNode {
  2.    int m_Data;
  3.    struct TNode * m_L, * m_R;
  4. } TNODE;
  5.  
  6. int maxDepth (TNODE * root) {
  7.     if (!root)return 0;
  8.     int left = maxDepth(root->m_L);
  9.     int right = maxDepth(root->m_R);
  10.     return 1+(left > right ? left : right);
  11. }
Add Comment
Please, Sign In to add comment