Binary Tree Nodes

  • + 1 comment

    GOT IT !!!!! :-D

    select N, case when N =ANY (Select P from BST) AND P = ANY(Select N from BST)then 'Inner' when N != ANY (Select P from BST) AND P = ANY (Select N from BST) then 'Leaf' else 'Root'

    end
    

    from BST order by N;