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 where p is not null) then "Inner" else "Leaf" end as types 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 where p is not null) then "Inner" else "Leaf" end as types from BST order by n