Upper Saddle River: Pearson Prentice Hall, 2008. — 417 p.
Chapter Structs and Classes
Structs
Basic Class Concepts
Class Implementation
Testing a Class
Placing Function Definitions in the Class Definition (and Why We Shouldn't Do It)
Commenting a Class
The Differences Between a Struct and a Class
Exercises
Chapter Overloaded Operators, Class Templates, and Abstraction
Overloaded Operators
Using a Check Struct in the Checkbook Class
Class Templates
Classes and Abstraction
Exercises
Chapter More about Classes
The const Specifier
Constructors
Class Modification
Modifying the Checkbook Class to Keep a History of Checks
Exercises
Chapter Pointers and Dynamic Arrays
Pointers
The [ ] Operator
Dynamically Allocated Memory
Dynamic Arrays
The Delete Operator
Pointers to Objects
Running out of Heap Memory
Adjustable Arrays
Exercises
Chapter An Array Class
Array Class Template
Using the Array Class
Destructors
The Copy Constructor
The Overloaded Assignment Operator Function
An Example
Advantages and Disadvantages of an Array Class
The Standard Template Library
Exercises
Chapter Introduction to Object-Oriented Programming
Composition
Inheritance
Polymorphism
Exercises
Chapter Methods for Making Data Structures
Using Arrays in Data Structures
Introduction to Linked Structures
Writing Code for Linked Lists
Arrays vs Linked Lists
Exercises
Chapter Stacks and Queues
The Stack ADT
Array Implementation of a Stack
Linked-List Implementation of a Stack
The Queue ADT
The Linked-List Implementation of a Queue
Other Linked-List Implementations of Queues
Array Implementation of a Queue
Exercises
Chapter Introduction to Time Complexities
Time Complexity Basics
The Constant Time Complexity
Big-Oh Notation
The Logarithmic Time Complexity
The Binary Search Algorithm
Computer Speed: Where Does It Really Come From?
Time Complexities of Data Structure Functions
Amortized Analysis of Array Expansion and Contraction
Exercises
Chapter The Linked List as a Data Structure
The List ADT
Using Key Values in Records of Information
Linked-List Implementation
Other Implementations
Exercises
Chapter Hash Tables
The Hash Table ADT
Hash Functions and Hash Table Design
Implementation Issues for a Hash Table
Pointers to Functions
A Hash Table Implementation
Using the Hash Table Implementation
A Hash Table Implementation of a Doubly Linked List
Exercises
Chapter Priority Queues, Trees, and Heaps
Priority Queue ADT
Priority Queue Design
Trees
Heaps
Using a One-Assignment Swap
A Heap Implementation of a Priority Queue (Array-Based)
The Design of a Linked (Embedded) Heap
A Linked (Embedded) Heap Implementation of a Priority Queue
Exercises
Chapter Recursion
A Recursive Factorial Function
Guidelines for Writing Recursive Functions
Using Recursion on Linked Structures
Time Complexities of Recursive Functions
Exercises
Chapter Introduction to Sorting Algorithms
Heapsort
Insertion Sort
Quicksort
Counting Sort
Sorting a Linked List
Exercises
Chapter Other Data Structures
Binary Search Trees
Comparison of the BST with Other Data Structures
Graphs
Comparing Adjacency Matrices with Adjacency Lists
Exercises
Appendix A: How to Compile and Work with Multiple-File Programs
Microsoft Visual Studio 2005 C++ Compiler
Compiling and Running Code Using Classes (Not Class Templates)
Compiling and Running Code Using Class Templates
Writing Code Using Microsoft Visual Studio 2005
Opening a Project in Microsoft Visual Studio 2005 That You Have Already Created
When Things Really Get Screwed Up
Unix Compilers