Data Structures and Program Design Using Java

Author: D. Malhotra, N. Malhotra
Publisher: Mercury Learning & Information
Pages: 430
ISBN: 9781683924647
Print: 1683924649
Kindle: B085W8GFW9
Audience: Java developers
Rating: 3
Reviewer: Alex Armstrong
Java is a good language to implement data structures.

This is a Java rewrite of a book I reviewed last year that features C++ and the review of it is substantially the same as, apart from the change in language the book is substantially, the same.

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 Java 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. A very standard and all too brief overview of Java.

The main topic of the book gets started at Chapter 3 with a look at the array Java is not a good language to use to introduce the low level ideas of array. Despite this the book explains how to calculate the memory location of an array element even though there is no elementary way of using this information in Java as it doesn't have pointers or memory allocation. The problem is that computing the address is introduced without really explaining why we are doing it. Could it be useful in the Java language in some way? Of course it isn't but it is what goes on under the hood. The algorithms are presented in pseudo code and all in caps, which makes me think of old punch card programs.

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 Java 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 Java, 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 Java 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. It is more or less what you would get if you rewrote any standard account of the subject. It doesn't provide any deep insights at a low level - nothing on storage mapping functions and nothing at a high level - nothing on generics or the problems of data structures and strong typing.You might like it if you want some code in Java or if you are planning to put on a very basic course in data structures using the language.


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.


Go Programming In Easy Steps

Author: Mike McGrath
Publisher: In Easy Steps
Date: January 2021
Pages: 192
ISBN: 978-1840789195
Print: 1840789190
Kindle: B08NF958NM
Audience: Non-programmers wanting to learn to code in Go
Rating: 5
Reviewer: Mike James
Getting going with Go - great idea!

Data Structures & Algorithms in Python

Author: Dr. John Canning, Alan Broder and Robert Lafore
Publisher: Addison-Wesley
Date: October 2022
Pages: 928
Print: 013485568X
Kindle: B0B1WJF1K9
Audience: Python developers
Rating: 4
Reviewer: Mike James
Data structures in Python - a good idea!

More Reviews

Last Updated ( Saturday, 05 September 2020 )