For each number between 1 to N, we will try to find it in the given array using linear search. And if we don’t find any of them, we will return the number. We know that the summation of the first N ...
You are given an array arr of size n - 1 that contains distinct integers in the range from 1 to n (inclusive). This array represents a permutation of the integers from 1 to n with one element missing.