Exercise 1: Linear vs. Binary Search Over 100,000 Elements — Possible Solution ==================================================================== GIVEN ------------------------------ A sorted array with n = 100,000 elements. STEP 1: LINEAR SCAN, WORST CASE ------------------------------ A linear scan may have to check every single element before finding (or ruling out) the target, so the worst case is exactly: 100,000 comparisons STEP 2: BINARY SEARCH, WORST CASE ------------------------------ Per this chapter's own formula, the worst case is ceil(log2(n)): log2(100,000) ~= 16.61 ceil(16.61) = 17 comparisons STEP 3: THE RATIO ------------------------------ 100,000 / 17 ~= 5,882 So in the worst case, linear search needs roughly 5,882 times more comparisons than binary search to search the exact same sorted data - an enormous difference in work for the identical correct result. WHY THIS WORKS AS AN ANSWER ------------------------------ Both worst-case figures are computed directly from this chapter's own stated formulas (n for linear scan, ceil(log2(n)) for binary search), and the ratio is computed explicitly rather than just stating that binary search is "much faster" without a concrete number attached.