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 Black.
Entry modified 23 December 2011.
HTML page formatted Fri Feb 23 10:06:08 2018.
Cite this as:
Paul E. Black, "transpose sequential search", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 23 December 2011. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/transposeSeqSearch.html