Beware of bugs in the above code; I have only proved it correct, not tried it.
Donald Ervin Knuth
American computer scientist, mathematician, and professor emeritus at Stanford University. Author of the multi-volume work The Art of Computer Programming. Worked on several branches of theoretical computer science. Father of the analysis of algorithms, systematized formal mathematical techniques for the analysis of the computational complexity of algorithms. Creator of TeX, METAFONT and the Computer Modern family of typefaces.