Function to find the maximized sum
def maximizeSum ( arr , K , n ) : NEW_LINE INDENT max_sum = 0 NEW_LINE start = 0 NEW_LINE end = n - 1 NEW_LINE print ( maxSum ( arr , K , start , end , max_sum ) ) NEW_LINE DEDENT