If arr [ i ] = max then rightmost index for max will change
elif ( arr [ i ] == max_element ) : NEW_LINE INDENT rightMax = i NEW_LINE DEDENT print ( " Minimum ▁ left ▁ : ▁ " , leftMin ) NEW_LINE print ( " Minimum ▁ right ▁ : ▁ " , rightMin ) NEW_LINE print ( " Maximum ▁ left ▁ : ▁ " , leftMax ) NEW_LINE print ( " Maximum ▁ right ▁ : ▁ " , rightMax ) NEW_LINE