Length of longest subarray whose sum is not divisible by integer K
Given an array arr[] of size N, find the length of its longest subarray such that the sum of its elements not divisible by K, or determine that such subarray does not exist. Examples: Input : N = 3 , K = 3 arr[] = {1, 2, 3} Output : 2 Explanation : Subarray [2,3] has sum of… Read More »
