Written with the intermediate to advanced C programmer in mind, Mastering Algorithms with C delivers a no-nonsense guide to the most common algorithms needed by real-world developers.
The highlight of the book has to be its concise and readable C functions for all the algorithms presented here, including basics like linked lists, stacks to trees, graphs, and sorting/searching algorithms. The C functions that implement these algorithms are clearly printed and remarkably easy to read. You can use this sample code directly or adapt it into your C/C++ code.
Although mathematical concepts like Big-O notation are discussed, the authors don't get bogged down in the computer science theory surrounding algorithms. Instead, they present the most tried-and-true algorithms available today in an efficient format. Besides introducing each algorithm, they describe how each is used in computing today, along with a short demo application. Some of these samples are quite low-level, such as a virtual memory manager implemented with linked lists. Most examples are more of general interest, such as a graphing example that counts network hops.
Each section ends with questions and answers about how the algorithms work, along with references to other algorithms (both in the book and from other sources). The authors concentrate on the most useful algorithms available today and don't try to cover every available variation. Busy readers will appreciate the intelligent selection--and efficient presentation--used here.
There are a number of books on C algorithms, but Master Algorithms with C is one of the most concise and immediately useful. It's a perfect choice for the working C/C++ programmer who's in a hurry to find just the right algorithm for writing real-world code. --Richard Dragan
Topics covered: Algorithm efficiency, pointer basics, arrays, recursion, Big-O Notation, linked lists, stacks, queues, sets, hash tables, trees and B-trees, searching, heaps and priority queues, graphs, sorting and searching algorithms, numerical methods, data compression, Huffman coding, LZ77, data encryption, DES, RSA, graph algorithms, minimum spanning trees, geometric algorithms, and convex hulls.
There are many books on data structures and algorithms, and some books laying out useful libraries of C functions, but this book aims to give you a unique combination of theoretical background and working code. In offering robust solutions for everyday programming tasks,
"Mastering Algorithms with C" avoids the abstract style of most classic data structures and algorithms texts but still provides all the information you need to understand the purpose and use of common programming techniques.
Implementations, as well as interesting, real-world examples of each data structure and algorithm, are shown in the text. Full source code appears on the accompanying disk.
Using both a programming style and a writing style that are exceptionally clean, Kyle Loudon shows you how to use such essential data structures as lists, stacks, queues, sets, trees, heaps, priority queues, and graphs. He shows you how to use algorithms for sorting, searching, numerical analysis, data compression, data encryption, common graph problems, and computational geometry. He also describes the relative efficiency of all implementations. The compression and encryption chapters not only give you working code for reasonably efficient solutions, they explain concepts in an approachable manner for people who never have had the time or expertise to study them in depth.
Anyone with a basic understanding of the C language can use this book. In order to provide maintainable and extendible code, an extra level of abstraction (such as pointers to functions) is used in examples where appropriate. Understanding that these techniques may be unfamiliar to some programmers, Loudon explains them clearly in theintroductory chapters.