Recursive Function to generate all non - increasing sequences with sum x arr [ ] -- > Elements of current sequence curr_sum -- > Current Sum curr_idx -- > Current index in arr [ ]
void generateUtil ( int x , int arr [ ] , int curr_sum , int curr_idx ) {