Chapter 8: Problem 18
Complete the following table calculating the average and maximum number of comparisons the linear search will perform, and the maximum number of comparisons the binary search will perform. $$\begin{array}{l|lllll} \hline & 50 & 500 & 10,000 & 100,000 & 10,000,000 \\ \text { Array Size } \rightarrow & \text { Elements } & \text { Elements } & \text { Elements } & \text { Elements } & \text { Elements } \\ \hline \text { Linear Search } & & & & & \\ \begin{array}{l} \text { (Average } \\ \text { Comparisons) } \end{array} & & & & & \\ \hline \text { Linear Search } & & & & & \\ \text { (Maximum } & & & & \\ \text { Comparisons) } & & & & & \\ \hline \text { Binary Search } & & & & & \\ \text { (Maximum } & & & & \\ \text { Comparisons) } & & & & & \\ \hline \end{array}$$
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.