Linear Equation Of N Variables
1. You are given an array(arr), which represents the coefficients of a linear equation of n variables. 2. You are also given a number, which represents R.H.S of the equation. For the equation 3x + 4y + 5z = 15 Array will be -> [3,4,5] and R.H.S will be -> 15 3. You have to find the number of non-negative integer solutions of the given equation.
1 <= N <= 10^3 1 <= arr[i] <= 10^3 1 <= X <= 10^4
A number N arr1 arr2... N numbers A number X
Check the sample output and question video.
3 1 2 3 4