Searching Arrays And Lists

In the last lesson, we learned about sorting arrays and lists. Sorting is a very common operation when analyzing and viewing data, since it enables you to prioritize and group data and view it in a more readable format. Another common operation when working with data is searching.

While using list.index() for searching arrays and lists is relatively efficient, there are cases when you'll want to implement your own searching logic such as when you want to find the occurrences of a term, you have custom search logic across multiple fields in a row, you have a data structure that doesn't have built-in search, or you want a higher-performance search algorithm for your search case.

For the above use cases, you'll have to find a different searching mechanism or code your own. In this lesson, we'll focus on searching arrays and lists. To understand how the different sorting works so you can begin sorting arrays and lists, we'll be using a set of bank transaction data that originally came from a Kaggle competition.

This lesson will focus on how to search for values in arrays and lists using linear search in binary search. These two searching algorithms are also covered in our algorithms and data structures

In addition to searching arrays and lists and getting familiar with the profile of each algorithm, you’ll get to apply what you’ve learned from within your browser; there's no need to use your own machine to do the exercises. The Python environment inside of this course includes answer-checking to ensure you've fully mastered each concept before learning the next.


  • Learn the difference between linear and binary search.
  • Learn to profile search algorithms.

Mission Outline

1. Searching Arrays
2. Searching Arrays
3. Linear Search
4. Searching Multiple Arrays
5. Profiling Linear Search
6. Binary Search
7. Binary Search
8. Complex Criteria With Binary Search
9. Fuzzy Matches With Binary Search
10. Profiling Binary Search
11. Profiling Binary Search With Sorting
12. Linear Vs Binary Search
13. Takeaways

Take a Look Inside