You are viewing a single comment's thread. Return to all comments →
select n, case when p is null then 'Root' when n not in (select p from bst where p is not null) then 'Leaf' else 'Inner' end as node_type 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 →