you give array num consist n positive integer you compute sum nonempty continuous subarray array sort nondecrease order create new array n n 1 2 numbersReturn sum number index leave index right index 1 inclusive new array since answer huge number return modulo 109 7 Example 1input num 1234 n 4 leave 1 right 5output 13 Explanation all subarray sum 1 3 6 10 2 5 9 3 7 4 after sort nondecrease order new array 1 2 3 3 4 5 6 7 9 10 the sum number index le 1 ri 5 1 2 3 3 4 13 Example 2input num 1234 n 4 leave 3 right 4output 6explanation the give array example 1 we new array 1 2 3 3 4 5 6 7 9 10 the sum number index le 3 ri 4 3 3 6example 3input num 1234 n 4 leave 1 right 10output 50 Constraintsn numslength1 numslength 10001 numsi 1001 leave right n n 1 2