1 / 4

Ask the class – Q1

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.

eyad
Télécharger la présentation

Ask the class – Q1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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

  3. 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

  4. 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

More Related