Continuous Subarray Sum

Medium · Hashing · about 20 minutes

Asked at Meta, Amazon, Google, Microsoft, Bloomberg.

All values in nums are non-negative. Decide whether some contiguous slice with two or more elements adds up to a multiple of k (a total of 0 counts as a multiple).

Related guides