Kevin Wayne
Princeton University
wayne@princeton.edu
In one version of the assignment, students implement autocomplete in two stages:
The assigment is nifty because autocomplete is a quintessential application of sorting that is familiar, authentic, and engaging. Autocomplete also exemplifies how applying a core HCI principle can dramatically improve user-interface design. Armed with only sorting, binary search, and a hundred lines of code, students can compose an effective solution to an important problem.
| Summary | Students compose a program to process autocomplete queries for a set of suggestions. |
| Topics | sorting, binary search, arrays, string processing, HCI |
| Audience | late CS1 or early CS2 |
| Difficulty | easy to moderate |
| Strengths |
|
| Weaknesses |
|
| Dependencies | Requires a basic I/O library to read text from a file, ideally one that supports Unicode. |
| Variants |
Many variations of this assignments are suitable for CS1 and CS2.
|