40 likes | 168 Views
Ask the class – Q1. How much longer will it take if you double the input for a linear search?. A: same time. B: a little longer. C: 2x longer. D: 4x longer. Ask the class – Q2. How much longer will it take if you double the input for a binary search?. A: same time. B: a little longer.
E N D
Ask the class – Q1 • How much longer will it take if you double the input for a linear search? A: same time B: a little longer C: 2x longer D: 4x longer
Ask the class – Q2 • How much longer will it take if you double the input for a binary search? A: same time B: a little longer C: 2x longer D: 4x longer
Ask the class – Q3 • How much longer will it take if you double the input for a simple sorting algorithm (e.g. bubble sort)? A: same time B: a little longer C: 2x longer D: 4x longer
Ask the class – Q4 • Mary has to visit 99 computer stores on her summer tour. • How much longer will it take to calculate the optimal tour if we add 1 more store? A: a little longer B: twice as long C: 4x longer D:100x longer