why cant we use mergesort to find the peak? it gives better time complexity 0(log n)?
Who said Merge sort time complexity is O(log n)?
It is O(n*log n).
merge method in the merge short takes O(logn) time but recursively calling this method of nth time takes it to n*logn i.e, O(nlogn).
Pallav-dwivedi, its not mergesort more specifically it’s divide and conquor method u are talking about