Unit plan: Data structures for searching

What's it all about?

Searching through items.

The previous lessons in the Searching algorithms unit have shown that the way we organise data can affect which algorithms we can use for searching through it. An unsorted list can't be searched with a binary search; the only way to search through it is to use a sequential search. A sequential search could be used to search a sorted list, but when the list is sorted we can use a binary search, which is a much faster algorithm.

Binary search tree vs hash table.

In computer science, the way we organise data to make it easier to work with is called a data structure. A sorted list is a very simple kind of data structure, where the way it is organised makes binary search possible. In this unit we'll look at two completely different data structures, binary search trees and hash tables, that are commonly used as the basis for searching when it is done …

Read the full unit plan description


Ages 11 to 14 Programming challenges
1 Binary search trees No