|Data Structures and Program Design Using C++|
Author: D. Malhotra
The subtitle of this book is "A Self-Teaching Introduction". I think it's more suitable as a text book for class study. It has none of the informal approach that a self study book needs to keep you reading. The presentation is very dry and academically oriented. The questions that you will find in each chapter are the sort of thing that you would be asked in a class exercise or homework.
The first chapter is an overview and here you meet all of the data structures introduced in the rest of the book along with a way of classifying them. Ideas are introduced quickly and without a great deal of discussion. I'm not sure a reader who had never met the ideas before would cope. At the end of the chapter there is a brief and only just adequate account of time complexity and big O notation. It doesn't tell you about worst case or best case characteristics nor does it explore any of the details of the way big O works or any of the variations on the idea. This is almost the least you need to know to get by and this is characteristic of much of the rest of the book.
Chapter 2 is a brief introduction to C++ which isn't going to help anyone who has no idea of programming or object oriented programming. The whole idea of class, inheritance etc is introduced in a few short pages and then the rest of the chapter deals with how to write control statements and so on. I was particularly puzzled by the account of encapsulation as being like a medicinal capsule hiding the medication from the user. Well it's not wrong exactly, but it's not really very helpful.
The main topic of the book gets started at Chapter 3 with a look at the array. C and C++ are good languages to use to introduce the array idea because they are implemented at a very low level, even so only having one short section on arrays and pointers doesn't seem quite enough. Also there is no mention of the problem of arrays as function parameters and return values. It's not wrong, but it is shallow from a practical point of view and overly academic from a theoretical point of view. There are many missed opportunities. For example, a short section explains how to calculate the address of any element in the array, but no connection is made with pointer arithmetic. I also have to say that I found the short paragraphs suggesting practical applications mystifying at times. In fact they seemed so disconnected from the subject they almost seemed like dreamy poems introduced to keep you amused:
"If there is a line of people standing one after another, and one boy is distributing advertisment pamphlets one by one to each person standing in the line"
Chapter 4 deals with the linked list. This is where object-oriented programming is used to implement singly- and doubly-linked lists. Chapter 5 pushes on to queues implemented using arrays and linked lists. Chapter 6 is a fairly standard account of searching and sorting.Chapter 7 is about stacks, which I think should have been introduced before queues. Chapter 8 deals with trees, binary and AVL trees and Chapter 9 extends this to B-Trees.. Chapter 10 introduces hashing. Chapter 11 is on files and is specific to C/C++ file handling. Finally we have a chapter on graphs, including Prim's and Kruskal's algorithms.
This is a fairly standard account of data structures as you would find in nearly any book on the subject. It has implementations in C++, but these are for your education only and not production quality code. There is nothing special about the organization or presentation and the style is dry and academic. I'm not sure why it has "Program Design" in the title because there is nothing specifically about this. It also doesn't introduce enough C++ for you not to need another book unless you already know the language.
Overall this is not a bad book but it isn't exceptional. You might like it if you want some code in C++ or if you are planning to put on a very basic course in data structures using the language.
For recommendations of C++ books see Top Choice C and C++ Books in our Programmer's Bookshelf section.
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.
|Last Updated ( Tuesday, 21 April 2020 )|