Function to return maximized sum at even indices
def maximizeSum ( arr ) : NEW_LINE INDENT n = len ( arr ) NEW_LINE sum = 0 NEW_LINE for i in range ( 0 , n , 2 ) : NEW_LINE INDENT sum += arr [ i ] NEW_LINE DEDENT DEDENT