To calculate the difference of odd indexed elements and even indexed elements
INDENT for i in range ( len ( arr ) ) : NEW_LINE INDENT if i % 2 : NEW_LINE minVal += minimize ( arr [ i ] ) NEW_LINE else : NEW_LINE maxVal += maximize ( arr [ i ] ) NEW_LINE DEDENT caseOne = abs ( maxVal - minVal ) NEW_LINE caseTwo = 0 NEW_LINE minVal = 0 NEW_LINE maxVal = 0 NEW_LINE DEDENT