1 / 4

Ask the class – Q1

In this discussion, we explore the impact of doubling the input size on various search and sorting algorithms, including linear search, binary search, and simple sorting algorithms like bubble sort. We will answer critical questions regarding the time complexities associated with these algorithms and how they scale with input size. Additionally, we will discuss optimization in route calculations, highlighting the effects of adding additional stops to a tour. This analysis is crucial for understanding algorithm efficiency in computational problems.

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