Maximum and minimum count of elements with sum at most K
Given an array arr[] of size N and an integer K, the task is to find the maximum and minimum number of elements whose sum is less than equal to K. Examples: Input: N = 4, arr[ ] = {6, 2, 1, 3}, K = 7Output: 3 1Explanation:Maximum number of elements whose sum is less than equal to K is 3 i.e [1, 2, 3