# @param num, a list of integer
# @return an integer
def findPeakElement(self, num):
the solution does not run at O(lgn), but the idea is very clear
The solution should be in logarithmic complexity. The complexity of your solution is O(nlgn).
num.index(max(num)) could be better
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.