Count of ways to choose 4 unique position elements one from each Array to make sum at most K
Given four arrays A[], B[], C[], D[] and an integer K. The task is to find the number of combinations of four unique indices p, q, r, s such that A[p] + B[q] + C[r] + D[s] ⤠K. Examples: Input: A = {2, 3}, B = {5, 2}, C = {0}, D = {1, 2}, K = 6Output: 3Explanation: The following are the required com