Functional Problem Solving (CSC 151 2016S) : Outlines

Outline 49: Binary Search Lab


Held: Monday, 2 May 2016

Back to Outline 48 - Association Lists. On to Outline 50 - An Introduction to Sorting.

Summary

We continue our explorations of binary search, grounding our explorations in practice.

Related Pages

Overview

Administrivia

Reminders

Upcoming Work:

Extra Credit

Academic / Artistic

Peer

Regular Peer

Misc

Not for Extra Credit

Exploring the Search API

Suppose we have data for various students on campus: Last Name (string), First Name (string), Graduation Year (integer), Box Number (integer), and Phone number (string). We might search by any of the four criteria (and by other criteria) and we might therefore order in various ways.

(define people
  (vector 
    ("Aanderson" "Aan"    2017 4114 "x4410")
    ("Brown"     "Bruin"  2016 8123 "x9000")
    ("Doe"       "J"      2018 9999 "none")
    ("Smith"     "Kieran" 2015 4112 "x9231")
    ("Taylor"    "Mic"    2017 1234 "x0001")))

Lab