Binary Tree Nodes

  • + 0 comments

    select N , IF(p is NULL, 'Root', IF(N in (select p from BST where p is not NUll), 'Inner','Leaf'))

    from BST order by N;