Longest Subarray Divisible by K with At Most One Negation II
Keep, for each remainder, the earliest start of subarrays with and without one negation, so each position is handled in one pass over the remainders.
Keep, for each remainder, the earliest start of subarrays with and without one negation, so each position is handled in one pass over the remainders.