Driver code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 6 , 7 , 1 , 3 , 8 , 2 , 4 ] ; NEW_LINE n = len ( arr ) ; NEW_LINE k = 2 ; NEW_LINE print ( maxSum ( arr , k , n ) ) ; NEW_LINE DEDENT