Easy O(n) solution!!!!!!!!!!🔥🔥🔥
IntuitionThe problem requires summing elements in the list that are greater than their neighbors at a given distance k. The idea is to iterate through the list

# Intuition
The problem requires summing elements in the list that are greater than their neighbors at a given distance `k`. The idea is to iterate through the list and check whether each element is greater than the element located `k` positions before and after it (if they exist).

# Approach
1. Initialize `res` to store the sum of "good numbers".
2. Iterate through the list using an index `i`.
3. For each element `l[i]`, check:
   - If there is no element at index `i-k`, or if `l[i-k] < l[i]`, ensuring it's greater than the element on the left (if present).
   - If there is no element at index `i+k`, or if `l[i+k] < l[i]`, ensuring it's greater than the element on the right (if present).
4. If both conditions are met, add `l[i]` to `res`.
5. Return `res` as the final sum.

# Complexity
- **Time complexity**: \(O(n)\), as we iterate through the list once.
- **Space complexity**: \(O(1)\), since only a few variables are used, regardless of input size.

# Code
```python
class Solution:
    def sumOfGoodNumbers(self, l: List[int], k: int) -> int:
        res = 0
        n = len(l)
        
        for i in range(n):
            left_condition = (i - k < 0 or l[i - k] < l[i])
            right_condition = (i + k >= n or l[i + k] < l[i])
            
            if left_condition and right_condition:
                res += l[i]
        
        return res
```

['Python3']