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