Sorting and searching - Knuth, Donald E. (Addison-Wesley, 1998)