Question DSA-ARR-0049
MediumAn array of size n contains numbers 1 to n with one missing and one repeated. Which method finds both in O(n) time and O(1) extra space?
- A.
Binary search
- B.
Sorting the array
- C.
Sign up free to see the answer and a step-by-step explanation.