Count Subarrays Where Sum mod K Equals Length
Asked at Amazon · Coding Questions · Difficulty: Medium
Given an array `pid` and integer `k`, count the contiguous subarrays for which `(subarray sum) % k == (subarray length)`.
Loading the problem…
Asked at Amazon · Coding Questions · Difficulty: Medium
Given an array `pid` and integer `k`, count the contiguous subarrays for which `(subarray sum) % k == (subarray length)`.
Loading the problem…