In this chapter you’ll:
Learn the concept of recursion.
Write and use recursive functions.
Determine the base case and recursion step in a recursive algorithm.
Learn how the system handles recursive function calls.
Compare recursion and iteration, including when it’s best to use each approach.
Search for a given value in an array using linear search and binary search.
Sort arrays using the simple iterative selection and insertion sort algorithms.
Sort arrays using the more complex but higher-performance recursive merge sort algorithm.
Use Big O notation to compare the efficiencies of searching and sorting algorithms.
Use Seaborn and Matplotlib to build an animated selection sort algorithm visualization.
In the exercises, implement additional sorting algorithms and animated visualizations, and determine the Big O of additional algorithms.
52.15.59.163