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 bs from BST order by N;