Question

3. [20 points] For an unsorted array of n integers, show that

a) 2n + 3 comparisons are sufficient to find whether any given three integers are in the

array.

b) 3n+3 comparisons are sufficient to find whether any given four integers are in the array.

Describe your algorithm using C-like pseudo code.

Question image 1