2025-08-24 12:47:23 +0300 MSK
Find Indices of Stable Mountains
Links
Code
class Solution:
def stableMountains(self, height: List[int], threshold: int) -> List[int]:
res, n = [], len(height)
for i in range(1, n):
cur, prv = height[i], height[i - 1]
if prv > threshold:
res.append(i)
return res