Review of Essential Algorithms

Working in computer science means knowing how to work with computer languages, but it also means knowing how to use math to obtain the results you want. Some math is relatively straightforward, but some becomes so complicated that you really do need some type of process or procedure for working with it. Essential Algorithms by Rod Stephens, “defines steps for performing a task in a certain way.” The first chapter begins by defining what an algorithm is and moves on from there to show you how they can help improve your ability to write complex applications.

The examples are written in a pseudocode that the author explains in Chapter 1. In fact, the explanation is accompanied by some examples of how to turn the pseudocode into an actual programming language. I’m almost positive some readers will take exception to the use of pseudocode because it doesn’t relate the example in their specific programming language, which would make implementation of the code as easy as possible for the reader. In this case, the use of pseudocode is impossible to avoid because the book would be far less useful without it.

This text could easily be used in a college. Each chapter ends with exercises that help the reader understand the concepts better (or at least determine whether any of the material actually sunk in). The answers to the examples appear in an appendix at the end of the book. However, in a college setting it might be possible to create a student version of the book without the appendix and a teacher version that includes the answers. The author also uses many of the same examples that I used when I was a student in college, but with an emphasis on diagrams to pictorially show how the examples work. The addition of graphics makes the examples considerably easier to understand.

The early chapters discuss specific kinds of algorithms that are used in every programming language that exists. For example, the author tackles the topic of randomizing data and ensuring that the randomizing process is fair. Of course, getting truly random data on a computer is impossible, but it’s possible to create random sequences of such complexity that the average human would never notice they aren’t random. This book discusses the topic at a length that I wish the text I had used in college would have provided.

Don’t get the idea that Essential Algorithms is light on the computer science aspects of using algorithms. For example, you’ll find coverage of all the basic structures used by most languages: linked lists, arrays, stacks, and queues. I could have wished for coverage of dequeues because many languages modify dequeues to create stacks and queues. Understanding how this essential structure works would have been great.

There are separate chapters for sorting and searching. These two tasks are performed so often by applications that an in depth knowledge really is a necessity for any computer scientist. All the common sorts are covered in sufficient detail that the reader should understand them with relative ease: insertion, selection, bubble, heap, quick, and merge. In addition, you find the counting and bucket sorts (two types of sorts that are completely missing my my college text—I took the time to check). The list of searches are likewise complete: linear, binary, and interpolation.

The opening chapters are finished with chapters on hash tables and recursion. I thought the chapter on hash tables was a bit light and their use as dictionaries in languages such as Python is only mentioned in passing. The chapter on recursion was far better done. I found the material on the various kinds of curves: Koch, Hilbert, and Sierpinski, exceptional.

The middle of the book (starting with Chapter 10) is taken up with trees, networks, and strings. There should be enough material here for anyone who really wants to learn the information. The author seems to hit his stride in these chapters—they’re both interesting and well written.

The end of the book starts with cryptography in Chapter 16. It’s the part of the book that just about anyone will find helpful and it’s also the part that separates this book from being a mere college text and more of a reference book. The chapter on complexity theory is exceptionally nice. Even if you’re already an expert in other areas of this book, it’s likely that you’ll find some new ideas in this part of the book—enough ideas to make it well worth the purchase price.

Overall, Essential Algorithms is the text I wish I had when studying the topic in college and it’ll make a fine addition to my bookshelf. I’ll likely use it as a reference book when trying to understand how various programming languages are implementing a practical need, such as determining how to work with structures such as stacks. I don’t delve deeply into security issues very often, but I’m sure that material will see use as well. There are some holes in the book, but I wouldn’t consider them deal killers and could provide great fodder for the author in the form of articles and blog posts. This is a great book and one that you need on your shelf.