Data Structures and Algorithms in C++

By Michael T. Goodrich, Roberto Tamassia and David M. Mount
This book provides a comprehensive introduction to data structures and algorithms, including their design, analysis, and implementation. In terms of the computer science and computer engineering curricula, we have written this book to be primarily focused on the Freshman-Sophomore level Data Structures (CS2) course.
This is a "sister"' book to Goodrich-Tamassia, Data Structures and Algorithms in Java (DSAJ), but uses C++ as the basis language instead of Java. This present book maintains the same general structure as DSAJ, so that CS/CE programs that teach data structures in both C++ and Java can share the same core syllabus, with one course using DSAJ and the other using this book.
While this book retains the same pedagogical approach and general structure as DSAJ, the code fragments have been completely redesigned. Because the C++ language supports almost all of Java's basic constructs, it would be tempting to simply translate the code fragments from Java to the corresponding C++ counterparts. We have been careful, however, to make full use of C++'s capabilities and design code in a manner that is consistent with modern C++ usage. In particular, whenever appropriate, we use elements of C++ that are not part of Java, including templated functions and classes, the C++ Standard Template Library (STL), C++ memory allocation and deallocation (and we discuss the associated tricky issues of writing destructors, copy constructors, and assignment operators), virtual functions and virtual class destructors, stream input and output, and C++'s safe run-time casting. However, we have avoided some of C++'s more arcane or easily misused elements, such as pointer arithmetic.
Highlights of this book include:
  • Review of basic features of the C++ programming language
  • Introduction to object-oriented design with C++ and design patterns
  • Consistent object-oriented viewpoint throughout the book
  • Comprehensive coverage of all the data structures taught in a typical CS2 course, including vectors, lists, heaps, hash tables, and search trees
  • Detailed explanation and visualization of sorting algorithms
  • Coverage of graph algorithms and pattern-matching algorithms for more advanced CS2 courses
  • Visual justifications (that is, picture proofs), which make mathematical arguments more understandable for students, appealing to visual learners
  • Motivation of algorithmic concepts with Internet-related applications, such as Web browsers and search engines
  • Accompanying Web site with a special password-protected area for instructors.

Click to Read More