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