Learning Objectives:
Software Tools Needed: Web browser to access textbook and an IDE (on-line or on computer) with core Python 3.6+ loaded.
A brute force way to find something in a list of items is to start at the beginning, and look at each one until the item is located. Or until you have looked at everything and determined it's not in the list. This approach is called linear search or sequential search. Work through the textbook section, thinking about the running time of the algorithm:
If your list of items has some order, then you can be much more efficient about searching for items. The standard approach is called binary search. Work through the textbook section, thinking about the running time of the algorithm:
The chapter ends with hashing as searching:
For additional practice on core Python, see the HackerRank prepare series:
HackerRank: Prepare Python
Click the Medium
option on the right hand menu, and work through their Python challenges.
For more practice on searching techniques to solve problems, here are some popular ones from LeetCode:
-->