If total number of elements are even or there exist two adjacent elements that are same then print 2
if ( n % 2 == 0 or one_adjacent_same == True ) : NEW_LINE INDENT print ( 2 ) NEW_LINE return NEW_LINE DEDENT