you set integer s originally contain number 1 n unfortunately error number s got duplicate number set result repetition number loss numberyou give integer array num represent datum status set errorfind number occur twice number miss return form array Example 1input num 1224output 23example 2input num 11output 12 constraints2 numslength 1041 numsi 104