2. An input file contains all the integers from 1 to n exactly once except one missing integer. The n - 1 integers may a
Posted: Sun May 15, 2022 11:52 am
2. An input file contains all the integers from 1 to n exactly once except one missing integer. The n - 1 integers may appear in any order. The goal is to find the missing integer. A solution may scan the input only once. (a) Describe a simple solution that requires O(n)-bits memory. (b) Describe a trickier solution that requires (log n)-bits memory