Peak element in an array in c

后端 未结 3 1825
情歌与酒
情歌与酒 2021-02-04 00:30

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

3条回答
  •  逝去的感伤
    2021-02-04 01:16

    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

提交回复
热议问题