2 Comments

The question is not understandable. How did you reach the numbers 14 and 22? From where did 2+4+8 came from ?

Expand full comment

Section i..j has value values[i]+values[j]. Therefore (values[0]+values[0]) + (values[1]+values[1]) + (values[2]+values[4]) == 2+4+8 == 14 and (values[0]+values[2]) + (values[3]+values[3]) + (values[4]+values[4]) == 4+8+10 == 22.

Expand full comment