© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
T. MailundIntroduction to Computational Thinkinghttps://doi.org/10.1007/978-1-4842-7077-6_5

5. Searching and Sorting

Thomas Mailund1  
(1)
Aarhus N, Denmark
 

In this chapter, we will explore two fundamental problems that are the foundations of many other algorithms: sorting sequences and searching for an element in them. These are central problems used as building blocks for a variety of other algorithms, and Python already has built-in functionality for solving them. You should practically always use the existing implementations; they are well engineered and optimized, so you are not likely to implement faster solutions yourself. The exception is when you have ...

Get Introduction to Computational Thinking: Problem Solving, Algorithms, Data Structures, and More now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.