Quick Find

Eager: does work immediately.

con: Quadratic algorithm
worst case: all of the entries except id[q] are changed from id[p] to id[q].

#algorithms #ruby