Available question text
Given nums, limit, and goal, find the minimum number of elements (each with absolute value ≤ limit) to add so the array sum equals goal — equivalently compute the difference goal - sum(nums) and return the smallest k such that k*limit covers the absolute difference (i.e., ceil(|diff|/limit)).
Related questions
Continue with questions that share topics or the same question type.
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 1785. Minimum Elements to Add to Form a Given Sum
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source