Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution {
- public:
- int peakIndexInMountainArray(vector<int>& A) {
- int index=max_element(A.begin(),A.end())-A.begin();
- return index;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement