give array integer num contain n 1 integer integer range 1 n inclusivethere repeat number num return repeat numberyou solve problem modifying array num use constant extra space Example 1input num 13422output 2example 2input num 31342output 3 Constraints1 n 105numslength n 11 numsi nAll integer num appear precisely integ appear times Follow uphow prove duplicate number exist numscan solve problem linear runtime complexity