give array integer arr find sum minb b range contiguous subarray arr since answer large return answer modulo 109 7 Example 1input arr 3124output 17explanation Subarrays 3 1 2 4 31 12 24 312 124 3124 Minimums 3 1 2 4 1 1 2 1 1 1sum 17example 2input arr 118194433output 444 Constraints1 arrlength 3 1041 arri 3 104