Binary Tree Nodes

  • + 0 comments

    select n, case when p is null then 'Root' when n in (select p from bst) then 'Inner' else 'Leaf' end as p from bst order by n;