Data Structures and Program Design Using C++

Author: D. Malhotra
Publisher: Mercury Learning & Information
Date: January 2019
Pages: 450
ISBN: 978-1683923701
Print: 1683923707
Kindle: B07MXPV983
Audience: C++ developers
Rating: 3
Reviewer: Alex Armstrong
C++ is a good language to implement data structures.

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.

Banner

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.

 

datastrucc

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.

Banner


Introducing SQL Server 2019 (Packt)

Author: Kellyn Gorman et al
Publisher: Packt Publishing
Pages: 488
ISBN: 978-1838826215
Print: 1838826211
Kindle: B088BNMRQ4
Audience: SQL Server DBAs and Devs
Rating: 3
Reviewer: Ian Stirk

Each new version of SQL Server introduces new features and enhances others. This book aims to discuss some of these [ ... ]



Python Programming and Visualization for Scientists 2nd Ed

Author: Alex DeCaria and Grant Petty
Publisher: Sundog Publishing
Pages: 372
ISBN: 978-0972903356
Print: 0972903356
Audience: Scientists wanting to use Python
Rating: 2
Reviewer: Mike James
Visualization - a difficult topic and difficult to see how to explain the ideas in a book.


More Reviews

Last Updated ( Tuesday, 21 April 2020 )