[prev] 22 [next]

Searching

An extremely common application in computing
  • given a (large) collection of items and a key value
  • find the item(s) in the collection containing that key
As previously
  • item = {key, val1, val2, ...}  (i.e. a struct)
  • key = value used to distinguish items  (e.g. student ID)
Keys may be ...
  • primary ... key value uniquely identifies one item
  • secondary ... many items may have the same key value

Applications:  Google,  databases, .....