Sorting In order to do a binary search we need to have the collection of data sorted. To learn about the different algorithms we will not use the java libraries or sorting. The first method will be a bubble sort, so inefficient that it is not even tested on the AP exam. It does provide a way to compare the efficiency of the algorithmsthat are on the Exam. Here is a link to a Google interview with Obama when he was first running for President.