I tried using the greedy approach but the approach is wrong. The only way I got is using all the array elements less than K and trying all possible combinations.
Is t