Driver Code
public static void Main ( String [ ] args ) { int [ ] arr = { - 2 , 1 , 3 , - 2 , 4 , - 7 , 20 } ; int K = 1 ; int N = arr . Length ; Console . WriteLine ( MaximumSubarraySum ( N , arr , K ) ) ; } }