Add modfied isBST() with one index array to store previous node