Dailyhunt interview question

implement isBST()