Algorithm · ByteDance · Medium
Given an integer array rawData and a positive integer localArea, find every index i such that the values moving outward from i on both sides are strictly decreasing for up to localArea steps. More formally, for an index i to qualify, the following must hold: For each step k from 1 to localArea where i - k >= 0, we require rawData[i - k] < rawData[i - k + 1]. In other words, the left‑side sequence starting at i must strictly decrease: rawData[i-1] < rawData[i], rawData[i-2] <…