Solved unique bianry search tree problem