Fundamental algorithms - Knuth,Donald Ervin (The art of computer programming,vol. 1,, 1973)