Continuous Subarray Sum Multiple of K
Medium
Prefix Sums with Hash Maps
Print YES if the array has a contiguous subarray of length at least 2 whose sum is a multiple of k, otherwise NO.
Constraints
1 <= n <= 10^5 1 <= k <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.