leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

3285.cpp (273B)


0 class Solution {
1 public:
2 vector<int> stableMountains(vector<int> &height, int threshold) {
3 vector<int> res;
5 for (int i = 1; i < size(height); i++) {
6 if (height[i - 1] > threshold) res.push_back(i);
7 }
9 return res;
10 }
11 };