I am given an array of integers. I have to find a peak element in it. An array element is peak if it is NOT smaller than its neighbors. For corner elements,cons
Yes, it is possible to find it in better time complexity. Using devide and conquer method
Following link will help you. http://courses.csail.mit.edu/6.006/spring11/lectures/lec02.pdf