From: rainer@deyke3.fc.hp.com (Rainer Deyke) Newsgroups: rec.games.programmer Subject: review: Practical Algorithms for Programmers Date: 14 Aug 1995 16:44:55 GMT Authors: Andrew Binstock and John Rex Title: Practical Algorithms for Programmers ISBN 0-201-63208-X I recently bought a book called "Practical Algorithms for Programmers" because many people seem to find these algorithm books useful and I could find or afford "Introduction to Algorithms" or "The Art of Computer Programming". I must say that for the most part I was disappointed. Having never taking any serious programming classes nor having read any other book on algorithms, I expected lots of useful algorithms that I could use to improve the performance of my programs. I didn't. Here's a list of chapters: Chapter 1: Introduction Pointless. Chapter 2: Basic Data Structures Linked lists, stacks, and queues. Nothing I didn't already use. Chapter 3: Hashing Ok, this one was pretty neat. Chapter 4: Searching A whole chapter about varois methods of searching a big string for a little string. Includes algorithms for searching for a single string, multiple string, a regular expression, and approximate strings. Two useful algorithms: Boyer-Moore and Aho-Corasick. The regular expression search was pretty much based on brute-force searching. I'm not saying that there is a better method, but why mention it at all if brute-force is the only method? The approximate string matching algorithms, Soundex and Metaphone, might be useful but I don't see them as general purpose algorithms. Chapter 5: Sorting Explains the bubble sort, insertion sort, Shellsort, Quicksort, and Heapsort, all implemented on arrays with insertion sort and Quicksort also implemented on linked lists. Lots of detail on how to avoid worst case scenarios on the Quicksort. This is the chapter I found the most disappointing. No mention of the radix sort or other non-comparism based methods. The insertion sort mentioned uses a linear searching method with no mention of a binary sort. Also mentions network sorts, which may be useful in hardware but not in software. Chapter 6: Trees Mentions binary trees, AVL trees, red-black trees, splay trees, and B-trees. Pretty neat I guess. Chapter 7: Date and Time The entire chapter is a waste of paper. It basically shows you how to clone the time/date functions in the standard C library. The only interesting information is the explanation of the Julian and Gregorian calendars. Might even be useful if it was implemented correctly. Chapter 8: Arbitrary-Precision Arithmetic Simply put, I could write a better and faster aribitrary precision math library in less time than it took me to read the chapter. Chapter 9: Data Compression Pretty neat. Features RLE, Huffman compression, sliding-window compression, and LZW. This chapter might even be useful for game programmers. Chapter 10: Data Integrity and Validation Tells you how to calculate a simple checksum and features CRC_CCIT, CRC-16, and CRC-32. Might have its uses. I myself never doubted my ability to write my own checksum algorithm. PS: All source code is in C and works in MS-DOS and UNIX. A disk with example code is availible $25 US(!!!) through mail. The book itself costs $29.95 in the US. -- +----------------------------------------------+ | Rainer Deyke (rainer@mdddhd.fc.hp.com) | | "The Earth shall inherit the meek" - Carcass | +----------------------------------------------+