Search data structure

The simplest, most general, and least efficient search structure is merely an unordered sequential list of all the items.

Useful search data structures allow faster retrieval; however, they are limited to queries of some specific kind.

A common special case of the latter are simultaneous range queries on two or more simple keys, such as "find all employee records with salary between 50,000 and 100,000 and hired between 1995 and 2007".

In this table, the asymptotic notation O(f(n)) means "not exceeding some fixed multiple of f(n) in the worst case."

[5] This table is only an approximate summary; for each data structure there are special situations and variants that may lead to different costs.