A list of n-1 integers is provided, where each integer is in the range of 1 to n, and there are no duplicates. One integer is missing from the list. What is…
A list of n-1 integers is provided, where each integer is in the range of 1 to n, and there are no duplicates. One integer is missing from the list. What is the time and space complexity if we apply a brute force algorithm to find the missing integer?
Show answerHide answer
Correct answer: (D) O(n2) time, O(1) space