Available question text
Find the shortest non-empty (or possibly empty) contiguous subarray to remove (but not the entire array) so that the remaining elements' sum is divisible by p. This reduces to finding the minimal-length subarray whose sum % p equals totalSum % p — solvable via prefix-sum modulo arithmetic with a hash map of seen remainders.
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 1590. Make Sum Divisible by P
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source