give integer array arr integer k modify array repeat k timesFor example arr 1 2 k 3 modify array 1 2 1 2 1 2return maximum subarray sum modify array note length subarray 0 sum case 0as answer large return answer modulo 109 7 Example 1input arr 12 k 3output 9Example 2input arr 121 k 5output 2example 3Input arr 12 k 7Output 0 Constraints1 arrlength 1051 k 105104 arri 104