Advertisement
sajid161

2:2 problem

Nov 29th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. class Solution {
  2. public:
  3.     int peakIndexInMountainArray(vector<int>& arr) {
  4.          int sz=max_element(arr.begin(),arr.end())-arr.begin();
  5.          return sz;
  6.        
  7.     }
  8. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement