One Repeating And One Missing
easy
1. You are given an array of length n containing numbers from 1 to n. 2. One number is present twice in array and one is missing. 3. You have to find these two numbers.
Constraints
1 <= n <= 10^9 1 <= a1,a2.. <= 10^9
Format
Input
A number n a1 a2.. n numbers
Output
Missing number Repeating Number
Example
Sample Input
7
1
3
4
5
1
6
2
Sample Output
Missing Number -> 7
Repeating Number -> 1
Question Video