Solve a problem in bst. Add adjacency list.