REVIEW - Mastering Algorithms with C


Mastering Algorithms with C


Kyle Loudon



O'Reilly (1999)




Francis Glassborow


February 2000



I like the general structure of this book. Each chapter concludes with two sections. The first consists of questions that might naturally arise out of the material coupled with appropriate answers. The chapter then concludes with brief notes on related topics.

I am less happy with the coding style that the author uses to present his material. In many places he relies on #define to 'simplify' his code. I put simplify in quotes because I need some convincing that such things as:

#define list_size(list) ((list)->size)
offer much advantage to compensate for polluting your global namespace with lowercase pre-processor identifiers. Actually what much of the code does is to help me appreciate the advantages that C++ programmers have in this area.

My next reservation is that more than half this book is about data structures. If I had to do these in C I would first spend time on the subject of implementing abstract data types in C before going onto the detail of those structures I chose to cover.

At the end I was left wondering whether this book helps the reader to master programming algorithms and data-structures or just documents the author's library of implementations. If it were the former I would expect to feel confident (as a result of my reading) that I could design and implement some other algorithm or data- structure. However I have a distinct feeling that if I were not already capable of doing that, I would be struggling (badly) with understanding the author's implementations.

My feeling is that this book is best used as a thoroughly documented library with explanations of the implementations. I very much disagree with the back-cover claim that 'Anyone with a basic understanding of the C language can use this book'. You need to be a better than average C programmer to even use the provided implementations. I wonder just how many potential readers are left now that C++ and Java are so widely used.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED

By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED

Settings can be changed at any time from the Cookie Policy page.