Open kesh230 opened 1 year ago
can you plz assign this @Chitresh-code
Write the problem statement properly with the following info:
Do that and I'll assign it to you Happy hacking!
You are given a read-only array of N integers with values also in the range 1to N both inclusive. Each integer appears exactly once except A which appears twice and B which is missing. The task is to find the repeating and missing numbers A and B where A repeats twice and B is missing.
Input Format The first line contains integer , n, the size of array arr[] The second line contains n space separated integers arr[i].
Constraints 1<=n<=1000 -10000 <= arr[i] <= 10000, 0<=i<=n
Output Format The output contains two space separated integers where first number is the number which is appearing twice and second integer is the number which is missing
Sample Input 0 5 3 1 2 5 3
Sample Output 0 3 4
@Chitresh-code Can you assign me this issue
@swarupsahu08 assigning this issue to you.
@Chitresh-code Can I contribute this in java
@swarupsahu08 there's already a PR submitted for java, if their code is right your PR won't be merged.
Sorting increasing or decreasing order in O(n) time of complexity.
You are given a read-only array of N integers with values also in the range 1to N both inclusive. Each integer appears exactly once except A which appears twice and B which is missing. The task is to find the repeating and missing numbers A and B where A repeats twice and B is missing.
Input Format The first line contains integer, n, the size of array arr[] The second line contains n space-separated integers arr[i].
Constraints 1<=n<=1000 -10000 <= arr[i] <= 10000, 0<=i<=n
Output Format The output contains two space-separated integers where the first number is the number that appears twice and the second integer is the number that is missing
Sample Input 0
Sample Output 0
3 4