Missing Number in the Array Coding Question — Asked in Qualcomm Interview Rounds.
Problem Statement :
Given an array of size N-1 such that it only contains distinct integers in the range of 1 to N. Find the missing element.
The first line of the input contains the value of N.
The second line contains a list of numbers from 1 to N-1.
The output contains one line of elements not present in the sequence of numbers between 1 and N-1.
6 1 2 8 3 4 7 10 5