table

Complete

Summary

Table

  • binds a key to a value
  • allows lookup for stored values

Direct addressing table(DAT) - array

  • the values are used as the key/indexes of the array
OperationMethodPerformance
search(v)check if the index v is filled-
insert(v)fill index v-
remove(v)empty index v-

the couting array in counting sort works similarly, range of keys must be small(and non-negative), space

Concept

Table operations

  • search(v)
    • determine if v exists in the table
  • insert(v)
    • insert v into the table
  • remove(v)
    • remove v from the table
0123...kv0v3vk