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 distinct P from BST) then 'Inner' else 'Leaf' end as X 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 distinct P from BST) then 'Inner' else 'Leaf' end as X from BST order by N;