Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Data structures and algorithms in Python
Goodrich M., Tamassia R., Goldwasser M., Wiley Publishing, Hoboken, NJ, 2013. 748 pp.  Type: Book (978-1-118290-27-9)
Date Reviewed: Nov 20 2013

Designed for use in introductory- or intermediate-level courses in data structures and algorithms, this book has modest prerequisites: familiarity with high school mathematics and an acquaintance with some procedural or object-oriented programming language, by which the authors mean having an understanding of variables, expressions, for and while loops, and functions or methods. Prior experience with Python is not required, as chapter 1 amounts to a primer on the basics of the language.

The material includes the concepts one would expect: stacks, queues, linked lists, trees, maps, hash tables, sorting, and graph algorithms. But there are also chapters on object-oriented programming, algorithmic analysis, recursion, search trees, graph algorithms, and B-trees. For good measure, examples are given for applications such as processing file systems, matching Hypertext Markup Language (HTML) tags, elementary cryptography, text frequency analysis, automated geometric layout, Huffman encoding, DNA sequence alignment, and search engine indexing. Clearly, to cover all this material in one semester, the instructor will need to either proceed at a rapid clip or designate sections to be covered in class and sections for outside reading.

What sets this book apart is the approach taken by the authors: the presentation is centered on the specification of abstract data structures. From these, Python code is developed in strict object-oriented fashion, with data structures encapsulated in classes and algorithms expressed as class methods. When appropriate, different implementation strategies are detailed, such as arrays or linked lists for stacks and queues. Nearly all of the algorithms are presented as Python code fragments, which the reader must encapsulate in appropriate code to make an executable program.

The chapter on algorithmic analysis deserves special mention. The topic is growth rates, and the authors present seven functions for the analysis: constant, logarithmic, linear, n-log-n, quadratic, polynomial, and exponential. For asymptotic analysis, the authors introduce big O, big omega, and big theta notations, with exceptionally clear explanations and examples. In subsequent chapters, the efficiency of the algorithms under study is given, but not analyzed, using the big O notation.

The book provides plenty of exercises at the end of each chapter. These fall into one of three categories: reinforcement, creativity, or projects. In many places, the authors use creativity exercises to present significant material, without any hints on how to proceed. In reality, most students will solve these problems by searching the Internet for existing solutions, perhaps translating found solutions into Python. Nevertheless, the quantity and quality of exercises is very good; students should be encouraged to work on as many as they can, and to read the rest and at least mentally plan an approach.

The publisher’s website contains all of the Python code shown in the book, plus solutions to many (but not all) of the exercises, color versions of the black-and-white photos and illustrations in the book, and slides in PowerPoint and portable document format (PDF). Some of this material, intended for instructors, requires registration. A summary of errata is not provided.

This textbook reflects the in-class experience of two of the three authors, who authored two previous books in the series [1,2]. However, this book does not simply translate either of the previous books into Python. The material, and especially the code, has been significantly redesigned and reorganized. Plus, the authors acknowledge the copious comments they have received from reviewers and readers.

In a very real sense, this is a mature book that deserves consideration from instructors who wish to teach Python at this level. But I’m left with the feeling that Python may be more the language of current fashion than the optimal language for studying algorithms and data structures. I don’t object to Python per se, but while reading this book, I sometimes had the feeling that the Python code was developed nearly ex nihilo, dictated more by language considerations than by a logical progression of incremental development from abstract data structure to executable code. In that respect, of course, Python is not unique.

In summary, I found this to be a solid book, worthy of joining the pool of textbooks on data structures and algorithms.

Reviewer:  Edgar R. Chavez Review #: CR141744 (1401-0015)
1) Goodrich, M. T.; Tamassia, R. Data structures and algorithms in Java (5th ed.). Wiley, Hoboken, NJ, 2010.
2) Goodrich, M. T.; Tamassia, R.; Mount, D. M. Data structures and algorithms in C++ (2nd ed.). Wiley, Hoboken, NJ, 2011.
Bookmark and Share
  Reviewer Selected
Featured Reviewer
Python (D.3.2 ... )
Data Structures (E.1 )
Would you recommend this review?
Other reviews under "Python": Date
Python for probability, statistics, and machine learning (2nd ed.)
Unpingco J.,  Springer International Publishing, New York, NY, 2019. 384 pp. Type: Book (978-3-030185-44-2)
Oct 15 2020
Pro Python 3: features and tools for professional development (3rd ed.)
Browning J., Alchin M.,  Apress, New York, NY, 2019. 480 pp. Type: Book (978-1-484243-84-8)
Feb 26 2020
Personal finance with Python: using pandas, Requests, and Recurrent
Humber M.,  Apress, New York, NY, 2018. 117 pp. Type: Book (978-1-484238-01-1), Reviews: (2 of 2)
Sep 27 2019

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright © 2000-2021 ThinkLoud, Inc.
Terms of Use
| Privacy Policy