Count the number of 0 s , 1 s and 2 s in the array
for i in range ( n ) : NEW_LINE INDENT if arr [ i ] == 0 : NEW_LINE INDENT cnt0 += 1 NEW_LINE DEDENT elif arr [ i ] == 1 : NEW_LINE INDENT cnt1 += 1 NEW_LINE DEDENT elif arr [ i ] == 2 : NEW_LINE INDENT cnt2 += 1 NEW_LINE DEDENT DEDENT