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 n_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 →