Author: Michael McMillan
Date: March 24, 2014
Reviewer: Ian Elliot
A book explaining the standard data structures in the worlds most popular language sounds like a really good idea.
Every programmer should know about data structures and the algorithms that relate to them. The reason is simply that they are the foundation of algorithmic thinking. If you can't contemplate a range of data structures that are applicable to a problem you aren't finding the best solution just a solution.
Chapter 6 moves us on to more advanced territory - the linked list. If you want to do almost anything all you need is a linked list. We have a fairly standard implementation of the linked list using properties as pointers to the next item. All of the standard list operations are explained and the typical extension you encounter to make things practical - circular lists and doubly linked lists.
Chapter 8 deals with hashing and while it introduces the basic ideas it does nothing to convince the reader that creating a hash function is a difficult task - it is. This is a very basic introduction to hashing and I doubt the reader would be in a position to implement a practical hash table after reading it.
The next chapter deals with sets - not a data structure that is often encountered. The implementation uses an Array and it works but in the real world sets are usually implemented as binary representations for speed.
The authors then move on to deal with trees and more complex data handling. In Chapter 10 we have a look at binary trees and binary search trees. Chapter 11 moves on to graphs in general and depth first breadth first search.
Now at last. we get to the second topic promised in the book's title - algorithms. Chapter 12 covers those used to sort arrays: bubble sort, selection sort and insertion sort, Shell sort, merge sort and quick sort. Then Chapter 13 is on Searching algorithms, including binary search on a linear array which would have been better covered before binary search trees.
The final chapter is a short taste of advanced algorithms used for dynamic programming and greedy algorithms. There are examples and some explanation but I doubt that the reader is going to have much luck inventing their own algorithms of either type after reading this chapter.
The biggest problem is that the book does little to give you an idea of what data structures are all about and what powerful properties particular structures possess. For example, a stack is an amazing machine. It has the ability to reorder data - push ABC and you get back CBA. It is linked to the grammer of arithmetic expressions and can be used to implement their evaluation. According to this book a stack is a data structure with a push and pop operation and a few strange uses.
To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.