Binary Tree Nodes

  • + 0 comments

    ngoccth_SQL SERVER: SELECT N , CASE WHEN P IS NULL THEN 'Root' WHEN N IN (SELECT P FROM BST) THEN 'Inner' ELSE 'Leaf' END AS name FROM BST ORDER BY N