CHAPTER 16

image

Searching

9781484217894_unFig16-01.jpg

Searching is an important and very common operation that computers do all the time. Searches are used every time someone does a ctrl-f for “find,” when a user uses “type-to” to quickly select an item, or when a web server pulls information about a customer to present a customized web page with the customer’s order.

There are a lot of ways to search for data. Google has based an entire multibillion dollar company on this fact. This chapter introduces the two simplest methods for searching: the linear search and the binary ...

Get Program Arcade Games: With Python and Pygame, Fourth Edition 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.