Fast algorithms for sorting and searching strings

Jon Bentley, Robert Sedgewick

Symposium on Discrete Algorithms · 1997 · 398 citations · 20 references

Concepts

TL;DR

The basic ideas behind the algorithms date back to the 1960s, but their practical utility has been overlooked. The study presents theoretical algorithms for sorting and searching multikey data, practical C implementations for character string applications, and extensions to complex string problems such as partial‑match searching. The authors develop theoretical multikey sorting and searching algorithms and implement them in C for character string applications, also extending the methods to partial‑match searching. The sorting algorithm combines Quicksort and radix sort and rivals the best C sort codes, while the searching algorithm merges tries and binary search trees and outperforms hashing and other common methods.

Abstract

We present theoretical algorithms for sorting and searching multikey data, and derive from them practical C implementations for applications in which keys are character strings. The sorting algorithm blends Quicksort and radix sort; it is competitive with the best known C sort codes. The searching algorithm blends tries and binary search trees; it is faster than hashing and other commonly used search methods. The basic ideas behind the algorithms date back at least to the 1960s, but their practical utility has been overlooked. We also present extensions to more complex string problems, such as partial-match searching.

References

20