Available question text
Given an array nums and integer k, return the sum of all elements nums[i] that are strictly greater than the elements at indices i-k and i+k whenever those indices exist (edge comparisons only consider existing neighbors); if an element has neither neighbor, it is considered good.
Related questions
Continue with questions that share topics or the same question type.
- Consecutive Numbers Sum
Coding · Enumeration · Math
- Count Good Numbers
Coding
- Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
Coding
- Maximum Good Subarray Sum
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3452. Sum of Good Numbers
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source