Sorting and Searching, vol. 3 of The Art of Computer Programming (2nd edition (1998)

by D Knuth