Welcome to the fifth edition of Data Structures and Abstractions with Java, a book for an introductory course in data structures, typically known as CS-2. I wrote the first edition of this book with you in mind—whether you are an instructor or a student—based upon my experiences during more than three decades of teaching undergraduate computer science. I wanted my book to be reader friendly so that students could learn more easily and instructors could teach more effectively. To this end, you will find the material covered in small pieces—I call them “segments”—that are easy to digest and facilitate learning. Numerous examples that mimic real-world situations provide a context for the new material and help to make it easier for students to learn and retain abstract concepts. Many illustrations clarify complicated ideas. Included are over 60 video tutorials to supplement the instruction and help students when their instructor is unavailable.

I am happy to work again with my colleague and co-author of the previous edition, Dr. Timothy Henry. Together we have continued to enhance the presentation with our focus on design decisions for both specifications and implementations of various data structures, as well as our emphasis on safe and secure programming practices.

This book’s organization, sequencing, and pace of topic coverage make teaching and learning easier by

  • Focusing the reader’s attention on one concept at a time

  • Providing flexibility in the order in which you can cover topics

  • Clearly distinguishing between the specification and implementation of abstract data types (ADTs)

  • Separating the relevant coverage of Java into Java Interludes, which you can use as needed

To accomplish this approach, we have organized the material into 30 chapters, composed of small, numbered segments that deal with one concept at a time. Each chapter focuses on either the specification and use of an ADT or its various implementations. You can choose to cover the specification of an ADT followed by its implementations, or you can treat the specification and use of several ADTs before you consider any implementation issues. The book’s organization makes it easy for you to choose the topic order that you prefer.

Our use of Java Interludes to treat the pertinent aspects of Java clearly separate our coverage of data structures from Java-specific issues. These interludes occur between chapters throughout the book as needed. Our focus, however, is on data structures not Java. You can see the titles of these interludes, as well as their placement between chapters, in the table of contents.

We hope that you enjoy reading this book. Like many others before you, you can learn—or teach —data structures in an effective and sustainable way.

A Note to Students: The topics that we cover in this book deal with the various ways of organizing data so that a given application can access and manipulate data in an efficient way. These topics are fundamental to your future study of computer science, as they provide you with the foundation of knowledge required to create complex and reliable software. Whether you are interested in designing video games or software for robotic controlled surgery, the study of data structures is vital to your success. Even if you do not study all of the topics in this book now, you are likely to encounter them later. We hope that you will enjoy reading the book, and that it will serve as a useful reference tool for your future courses.