Data Structures with C++ Using STL, 2/e

William H. Ford, William R. Topp

買這商品的人也買了...

商品描述

This long-awaited second edition of Data Structures with C++ Using STL, by Professors Ford and Topp, provides a modern object-oriented approach to data structures using the model of the Standard Template Library (STL). The authors unify the study of data structures around the concepts of containers and iterators. The book skillfully develops algorithms for the data structures and their applications. Readers will find a systematic and detailed implementation for each data structure. These successful authors offer a learning tool that is motivated by a wealth of excellent examples and complete running programs.

KEY FEATURES

  • Uses the early chapters to present object design and programming principles that are at the core of data structures.
  • Develops clear and concise templates, which can support generic programming throughout the book.
  • Uses the STL container classes throughout the book.
  • Presents an Application Programming Interface (API) for each STL container and immediately uses it to solve problems.
  • Demonstrates the implementation of the STL classes by developing mini-container classes that use the corresponding STL interface. The student can understand the overall design of the container and its C++ implementation code.
  • Includes and intuitive and precise introduction to iterators that are at the core of modern data structures.
  • Covers with the same careful style advanced topics such as red-black trees, hash tables, heaps, and graphs.
  • Provides the reader with an extensive development of advanced recursion and inheritance as applied to data structures.
  • Makes available valuable pedagogical features including chapter objectives and summaries; many complete programs with runtime output; case studies; review exercises with solutions for each chapter; extensive written and programming exercises; and a programming project for each chapter.
  • Supplement: Instructor CD with solutions and a test item file; Companion Website containing language tutorials, students assessment materials, and PowerPoint slides.

Table of Contents


Preface.
1. Introduction to Data Structures.

What is this Book About? Abstract View of Data Structures. An ADT as a Class. Implementing C++ Classes. Declaring and Using Objects. Implementing a Class with Inline Code. Application Programming Interface(API). Strings.


2. Object Design Techniques.

Software Design. Handling Runtime Errors. Object Composition. Operator Overloading.


3. Introduction to Algorithms.

Selection Sort. Simple Search Algorithms. Analysis of Algorithms. Analyzing the Search Algorithms. Making Algorithms Generic. The Concept of Recursion. Problem Solving with Recursion.


4. The Vector Container.

Overview of STL Container Classes. Template Classes. The Vector Class. Vector Applications.


5. Pointers and Dynamic Memory.

C++ Pointers. Dynamic Memory. Classes Using Dynamic Memory. Assignment and Initialization. The Minivector Class. The Matrix Class.


6. The List Container and Iterators.

The List Container. Iterators. General List Insert And Erase Operations. Case Study: Graduation Lists.


7. Stacks.

The Stack ADT. Recursive Code and the Runtime Stack. Stack Implementation. Postfix Expressions. Case Study: Infix Expression Evaluation.


8. Queues and Priority Queues.

The Queue ADT. The Radix Sort. Implementing the Miniqueue Class. Case Study: Time-Driven Simulation. Array Based Queue Implementation. Priority Queues.


9. Linked Lists.

Linked List Nodes. Building Linked Lists. Handling The Back of the List. Implementing a Linked Queue. Doubly Linked Lists. Updating A Doubly Linked List. The Josephus Problem. The Minilist Class. Selecting a Sequence Container.


10.Binary Trees.

Tree Structures. Binary Tree Nodes. Binary Tree Scan Algorithms. Using Tree Scan Algorithms. Binary Search Trees. Using Binary Search Trees. Implementing the Stree Class. The Stree Iterator (Optional).


11. Associative Containers.

Overview of Associative Containers. Sets. Maps. Multisets. Implementing Sets And Maps.


12. Advanced Associative Structures.

Hashing. Designing Hash Functions. Designing Hash Tables. The Hash Class. Hash Table Performance. 2-3-4 Trees. Red-Black Trees. The Rbtree Class.


13. Inheritance and Abstract Classes.

Inheritance in C++. The Graphics Hierarchy. The Graphics System. Safe Vectors. Ordered Lists. Polymorphism and Virtual Functions. Abstract Classes.


14. Heaps Binary Files and Bit Sets.

Array Based Binary Trees. Heaps. Implementing a Priority Queue. Binary Files. Bitsets. Case Study: Huffman Compression.


15. Recursive Algorithms.

Divide and Conquer Algorithms. Combinatorics. Dynamic Programming. Backtracking: The Eight-Queens Problem.


16. Graphs.

Graph Terminology. The Graph Class. Graph Class Design. Graph Traversal Algorithms. Graph Traversal Applications. Graph Minimization Algorithms.


Index.