Valid BST Permutations

Company: Oracle_27thjuly

Difficulty: medium