Binary Tree Nodes Hackerrank Solution Sql