A weblog by Will Fitzgerald

Comparing algorithm styles

While poking around as I created my previous post, I discovered that the LaTeX sources for printing algorithms in the style used in Introduction to Algorithms is available from Thomas H. Cormen’s website. Below are examples of an insertion sort algorithm typeset using Cormen’s style, and the same algorithm typeset using the standard “algorithm” package. Which do you like better?



One response to “Comparing algorithm styles

  1. Daniel Lemire April 14, 2005 at 12:13 pm

    More interesting would be the ability to include LaTeX in our blogs. Didier does this already with wordpress, but it seems a bit complicated.

    The best solution so far seems to be this one:


    I have yet to try it though!

    I’m sure that with some hacking, it could be made to support some form of algorithm format.

%d bloggers like this: