Longest subarray having sum K | Set 2
Given an array arr[] of size N containing integers. The task is to find the length of the longest sub-array having sum equal to the given value K. Examples: Input: arr[] = {2, 3, 4, 2, 1, 1}, K = 10 Output: 4 Explanation: The subarray {3, 4, 2, 1} gives summation as 10. Input: arr[] = {6, 8, 14, 9,