0 95
find the missing integers
Answers
Answered by
9
Answer:
Now, sum of natural numbers from 1 to N, can be expressed as Nx(N+1)/2 . In your case N=100. Subtract the sum of the array from Nx(N+1)/2 , where N=100. That is the missing number.
Answered by
5
Answer:
Write an efficient code to find the missing integer. Example: ... int main(). {. int arr[] = { 1, 2, 4, 5, 6 };. int n = sizeof (arr) / sizeof (arr[0]);. int miss ...
Similar questions