Find the element before which all the elements are smaller than it, and after which all are greater
Given an array, find an element before which all elements are smaller than it, and after which all are greater than it. Return index of the element if there is such an element, otherwise return -1.
Read full article from Find the element before which all the elements are smaller than it, and after which all are greater - GeeksforGeeks
No comments:
Post a Comment