You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Tree Nodes
You are viewing a single comment's thread. Return to all 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