Skip to content

Commit

Permalink
Day 18 questions updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumyakanta06 committed Oct 8, 2021
1 parent 8d5d46b commit 0169ff3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Day 18/Problem Statement 18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
A number of balls are kept in a basket each named in the range [1,n]. some students picked few balls randomly and changed their numbers to existing numbers in the box and then added back. Now box has unique numbers + duplicate numbers. Find the original numbers on the balls whose numbers were changed.

Input variables:-
int t: no. of test cases
int n: range
int arr[]: array conatining the original and duplicate numbered balls

Input Description:
-First line of input consists of t, the number of test cases
-Next each lines consist of n the range
-Next line consist of the array conatining the original and duplicate numbered balls

Output Description:-
Print the balls whose numbers were changed

Constraints:-
-> 1<=t,n<=10
->1<= value of each array element <=10

Sample Input:
2
4
[4,3,2,7,8,2,3,1]
2
[1,1]

Sample Output:
5,6
2

0 comments on commit 0169ff3

Please sign in to comment.