in the problem statement it is assumed that num[-1] == num[n] == - infinity
therefore I would expect  to return 1 not 0 !
The function should return the index of the peak value, not the peak value itself. The first element of the array (the only element in an array with exactly one value) will have an index of 0.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.