21. Given 21 distinct elements: $\{x_1, x_2, \dots, x_{20}, x_{21}\}$, it is known that $x_1 < x_2 < x_3, x_4 < x_5 < x_6, x_7 < x_8 < x_9, x_{10} < x_{11} < x_{12}, x_{13} < x_{14} < x_{15}$. Now we want to find both the maximum and the minimum in this array. What is the minimum number of comparisons to do this?
Solution: Elimination Method to remove certain number of elements from consideration. After the elimination just use the same way for Q20 to find a solution. Module 1 Part D End