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 from bst order by n