This book introduces about elementary algorithms and data structure. It includes side-by-side comparison about purely functional realization and their imperative counterpart.
- Chapter 1, Binary Search Tree, the 'hello world' data structure;
- Chapter 2, The evolution of insertion sort;
- Chapter 3, Red-black tree, not so complex as it was thought;
- Chapter 4, AVL tree;
- Chapter 5, Radix tree, Trie and Prefix Tree;
- Chapter 6, B-Trees;
- Chapter 7, Binary Heaps;
- Chapter 8, From grape to the world cup, the evolution of selection sort;
- Chapter 9, Binomial heap, Fibonacci heap, and pairing heap;
- Chapter 10, Queue, not so simple as it was thought;
- Chapter 11, Sequences, The last brick;
- Chapter 12, Divide and conquer, Quick sort vs. Merge sort
- Chapter 13, Searching
To build the book in PDF format from the sources, you need the following software pre-installed.
- TeXLive, The book is built with XeLaTeX, a Unicode friendly version of TeX;
In Debian/Ubuntu like Linux environment, do NOT install the TeXLive through apt-get. Go to TeXLive official site to download the setup script.
$ wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip $ unzip install-tl.zip $ cd install-tl $ sudo ./install-tl -gui text -repository http://mirror.ctan.org/systems/texlive/tlnet
Install ImageMagick and Graphviz
$ sudo apt-get install imagemagick $ sudo apt-get install graphviz
You need the GNU make tool, in Debian/Ubuntu like Linux, it can be installed through the apt-get command:
$ sudo apt-get install build-essential
In Windows, you can install the MSYS for it. In Mac OS X, please install the developer tool from this command line:
$ xcode-select --install
Build the book PDF
enter the folder contains the book TeX manuscript, run
This will generate algoxy-en.pdf and algoxy-zh-cn.pdf. If you only need the Chinese version for example, you can run
make cn instead.
The other two branches,
jvm are deprecated. Please do NOT checkout/track them.
``Cogito ergo sum''