My programing World
A collection of programs and interview questions
Wednesday, June 8, 2016
SQl binary tree
select n, case when p is null then 'Root'
when n in (select p from bst) then 'Inner'
else 'Leaf' end
from bst
order by n;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment