Computer Science, asked by abhijeetjha6024, 1 year ago

The array a[1:3, 3:4, 2:6] will have _____ ___ number of elements.

Answers

Answered by Vivek111s
0
You are given an array of n+2 elements. All elements of the array are in range 1 to n. And all elements occur once except two numbers which occur twice. Find the two repeating numbers.

For example, array = {4, 2, 4, 5, 2, 3, 1} and n = 5

The above array has n + 2 = 7 elements with all elements occurring once except 2 and 4 which occur twice. So the output should be 4 2.

Similar questions