Driver code
arr = [ 1 , 2 , 2 , 2 , 1 , 1 ] NEW_LINE n = len ( arr ) NEW_LINE ans = minSteps ( arr , 0 , 0 , n ) NEW_LINE if ( ans >= 9999999 ) : NEW_LINE INDENT print ( - 1 ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ans ) NEW_LINE DEDENT