Input : arr[] = { 19, 23, 30, 25, 45 } Output : false Explanation: The array is not in increasing order (since 30 > 25), so it cannot represent the inorder traversal of a Binary Search Tree (BST).
The idea is to use the fundamental property of BST: Inorder traversal of a Binary Search Tree always gives a sorted sequence. So, simply check whether the given array is sorted in increasing order or not.