Definition: Search an array or list by checking items one at a time. If the value is found, swap it with its predecessor so it is found faster next time.
Also known as self-organizing sequential search.
Generalization (I am a kind of ...)
linear search, Self-organising_heuristic [Wikipedia].
See also move-to-front heuristic, self-organizing list.
Note: This moves more frequently searched items to the front. If a few items are sought much more often than the rest, this can save time. A binary search or hash table is almost always faster, though.
If you have suggestions, corrections, or comments, please get in touch with Paul E. Black.
Entry modified 23 December 2011.
HTML page formatted Fri Jan 6 16:31:13 2012.
Cite this as:
Paul E. Black, "transpose sequential search", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 23 December 2011. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/transposeSeqSearch.html