aditya109/git-osp-for-beginners

Missing Element Using Binary search

Closed this issue · 1 comments

Given an array C of size N-1 and given that there are numbers from 1 to N with one element missing, the missing number is to be found Using Binary Search

Input:
The first line of input contains an integer T denoting the number of test cases. For each test case first line contains N(size of array). The subsequent line contains N-1 array elements.

Output:
Print the missing number in array.

Example:
Input:
1
5
1 2 3 5

Output:
4

Explanation:
Test case 1: Given array : 1 2 3 5. Missing element is 4.

plz assign me