PlaySimple Games interview question

Taking input and printing Binary Search Tree