13.1. Searching and Sorting

Computers store vast amounts of data. One of the strengths of computers is their ability to find things quickly. This ability is called searching. For the AP CS A exam you will need to know both sequential search and binary search.

The following video is also on YouTube at https://youtu.be/DHLCXXX1OtE. It introduces the concept of searching including sequential search and binary search.

Video: (DHLCXXX1OtE)

If binary search requires the values in an array or list to be sorted, how can you do that? There are many sorting algorithms. The three that you need to know for the AP CS A exam are:

There are many videos on YouTube that show these sorts. Here is a folk dance for selection sort.

Video: (Ns4TPTC8whw)

Here is folk dance for insertion sort.

Here is folk dance for merge sort.

Here is another video that talks about bubble sort, insertion sort, and quick sort. Of these only insertion sort is on the exam.

Video: (WaNLJf8xzC4)

You have attempted of activities on this page
Next Section - 13.2. Sequential Search