The indices which give 0 or 1 as the remainder when divided by 4 will be the maximum two elements of the group
if ( i % 4 < 2 ) : NEW_LINE INDENT sum += arr [ i ] ; NEW_LINE DEDENT return sum ; NEW_LINE