did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321441461

Data Structures and Algorithm Analysis in C++

by
  • ISBN13:

    9780321441461

  • ISBN10:

    032144146X

  • Edition: 3rd
  • Format: Hardcover
  • Copyright: 2006-02-28
  • Publisher: Prentice Hall
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $144.00 Save up to $54.01
  • Digital
    $89.99
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

In this text, readers are able to look at specific problems and see how careful implementations can reduce the time constraint for large amounts of data from several years to less than a second.Class templates are used to describe generic data structures and first-class versions of vector and string classes are used. Included is an appendix on a Standard Template Library (STL).This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amount of efficiency. Readers should have some knowledge of intermediate programming, including topics as object-based programming and recursion, and some background in discrete math.

Table of Contents

Prefacep. xv
Introductionp. 1
What's the Book About?p. 1
Mathematics Reviewp. 2
Exponentsp. 3
Logarithmsp. 3
Seriesp. 4
Modular Arithmeticp. 5
The P Wordp. 6
A Brief Introduction to Recursionp. 7
C++ Classesp. 11
Basic class Syntaxp. 12
Extra Constructor Syntax and Accessorsp. 12
Separation of Interface and Implementationp. 15
vector and stringp. 17
C++ Detailsp. 19
Pointersp. 19
Parameter Passingp. 21
Return Passingp. 22
Reference Variablesp. 23
The Big Three: Destructor, Copy Constructor, operator=p. 23
C-style Arrays and Stringsp. 26
Templatesp. 29
Function Templatesp. 29
Class Templatesp. 30
Object, Comparable, and an Examplep. 32
Function Objectsp. 34
Separate Compilation of Class Templatesp. 35
Using Matricesp. 37
The Data Members, Constructor, and Basic Accessorsp. 37
operator[]p. 37
Destructor, Copy Assignment, Copy Constructorp. 39
Summaryp. 39
Exercisesp. 39
Referencesp. 41
Algorithm Analysisp. 43
Mathematical Backgroundp. 43
Modelp. 46
What to Analyzep. 46
Running Time Calculationsp. 49
A Simple Examplep. 49
General Rulesp. 50
Solutions for the Maximum Subsequence Sum Problemp. 52
Logarithms in the Running Timep. 58
Checking Your Analysisp. 62
A Grain of Saltp. 63
Summaryp. 63
Exercisesp. 64
Referencesp. 69
Lists, Stacks, and Queuesp. 71
Abstract Data Types (ADTs)p. 71
The List ADTp. 72
Simple Array Implementation of Listsp. 72
Simple Linked Listsp. 73
vector and list in the STLp. 74
Iteratorsp. 75
Example: Using erase on a Listp. 77
const_iteratorsp. 77
Implementation of vectorp. 79
Implementation of listp. 83
The Stack ADTp. 94
Stack Modelp. 94
Implementation of Stacksp. 95
Applicationsp. 96
The Queue ADTp. 104
Queue Modelp. 104
Array Implementation of Queuesp. 104
Applications of Queuesp. 106
Summaryp. 107
Exercisesp. 108
Treesp. 113
Preliminariesp. 113
Implementation of Treesp. 114
Tree Traversals with an Applicationp. 115
Binary Treesp. 119
Implementationp. 120
An Example: Expression Treesp. 121
The Search Tree ADT-Binary Search Treesp. 124
containsp. 125
findMin and findMaxp. 125
insertp. 129
removep. 130
Destructor and Copy Assignment Operatorp. 132
Average-Case Analysisp. 133
AVL Treesp. 136
Single Rotationp. 139
Double Rotationp. 142
Splay Treesp. 149
A Simple Idea (That Does Not Work)p. 150
Splayingp. 152
Tree Traversals (Revisited)p. 158
B-Treesp. 159
Sets and Maps in the Standard Libraryp. 165
Setsp. 165
Mapsp. 166
Implementation of set and mapp. 167
An Example That Uses Several Mapsp. 168
Summaryp. 174
Exercisesp. 174
Referencesp. 181
Hashingp. 185
General Ideap. 185
Hash Functionp. 186
Separate Chainingp. 188
Hash Tables Without Linked Listsp. 192
Linear Probingp. 193
Quadratic Probingp. 195
Double Hashingp. 199
Rehashingp. 200
Hash Tables in the Standard Libraryp. 204
Extendible Hasingp. 204
Summaryp. 207
Exercisesp. 208
Referencesp. 211
Priority Queues (Heaps)p. 213
Modelp. 213
Simple Implementationsp. 214
Binary Heapp. 215
Structure Propertyp. 215
Heap-Order Propertyp. 216
Basic Heap Operationsp. 217
Other Heap Operationsp. 220
Applications of Priority Queuesp. 225
The Selection Problemp. 226
Event Simulationp. 227
d-Heapsp. 228
Leftist Heapsp. 229
Leftist Heap Propertyp. 229
Leftist Heap Operationsp. 230
Skew Heapsp. 235
Binomial Queuesp. 239
Binomial Queue Structurep. 240
Binomial Queue Operationsp. 241
Implementation of Binomial Queuesp. 244
Priority Queues in the Standard Libraryp. 251
Summaryp. 251
Exercisesp. 251
Referencesp. 257
Sortingp. 261
Preliminariesp. 261
Insertion Sortp. 262
The Algorithmp. 262
STL Implementation of Insertion Sortp. 263
Analysis of Insertion Sortp. 264
A Lower Bound for Simple Sorting Algorithmsp. 265
Shellsortp. 266
Worst-Case Analysis of Shellsortp. 268
Heapsortp. 270
Analysis of Heapsortp. 272
Mergesortp. 274
Analysis of Mergesortp. 276
Quicksortp. 279
Picking the Pivotp. 280
Partitioning Strategyp. 282
Small Arraysp. 284
Actual Quicksort Routinesp. 284
Analysis of Quicksortp. 287
A Linear-Expected-Time Algorithm for Selectionp. 290
Indirect Sortingp. 292
vector[left angle bracket]Comparable*[right angle bracket] Does Not Workp. 295
Smart Pointer Classp. 295
Overloading operator[left angle bracket]p. 295
Dereferencing a Pointer with *p. 295
Overloading the Type Conversion Operatorp. 295
Implicit Type Conversions Are Everywherep. 296
Dual-Direction Implicit Conversions Can Cause Ambiguitiesp. 296
Pointer Subtraction Is Legalp. 297
A General Lower Bound for Sortingp. 297
Decision Treesp. 297
Bucket Sortp. 299
External Sortingp. 300
Why We Need New Algorithmsp. 300
Model for External Sortingp. 300
The Simple Algorithmp. 301
Multiway Mergep. 302
Polyphase Mergep. 303
Replacement Selectionp. 304
Summaryp. 305
Exercisesp. 306
Referencesp. 311
The Disjoint Set Classp. 315
Equivalence Relationsp. 315
The Dynamic Equivalence Problemp. 316
Basic Data Structurep. 317
Smart Union Algorithmsp. 321
Path Compressionp. 324
Worst Case for Union-by-Rank and Path Compressionp. 325
Analysis of the Union/Find Algorithmp. 326
An Applicationp. 331
Summaryp. 334
Exercisesp. 335
Referencesp. 336
Graph Algorithmsp. 339
Definitionsp. 339
Representation of Graphsp. 340
Topological Sortp. 342
Shortest-Path Algorithmsp. 345
Unweighted Shortest Pathsp. 347
Dijkstra's Algorithmp. 351
Graphs with Negative Edge Costsp. 360
Acyclic Graphsp. 360
All-Pairs Shortest Pathp. 364
Shortest Path Examplep. 365
Network Flow Problemsp. 367
A Simple Maximum-Flow Algorithmp. 367
Minimum Spanning Treep. 372
Prim's Algorithmp. 373
Kruskal's Algorithmp. 376
Applications of Depth-First Searchp. 378
Undirected Graphsp. 379
Biconnectivityp. 381
Euler Circuitsp. 385
Directed Graphsp. 388
Finding Strong Componentsp. 390
Introduction to NP-Completenessp. 392
Easy vs. Hardp. 392
The Class NPp. 393
NP-Complete Problemsp. 394
Summaryp. 396
Exercisesp. 396
Referencesp. 404
Algorithm Design Techniquesp. 409
Greedy Algorithmsp. 409
A Simple Scheduling Problemp. 410
Huffman Codesp. 413
Approximate Bin Packingp. 419
Divide and Conquerp. 427
Running Time of Divide and Conquer Algorithmsp. 428
Closest-Points Problemp. 430
The Selection Problemp. 435
Theoretical Improvements for Arithmetic Problemsp. 438
Dynamic Programmingp. 442
Using a Table Instead of Recursionp. 442
Ordering Matrix Multiplicationsp. 444
Optimal Binary Search Treep. 447
All-Pairs Shortest Pathp. 451
Randomized Algorithmsp. 454
Random Number Generatorsp. 455
Skip Listsp. 459
Primality Testingp. 461
Backtracking Algorithmsp. 464
The Turnpike Reconstruction Problemp. 465
Gamesp. 469
Summaryp. 475
Exercisesp. 475
Referencesp. 485
Amortized Analysisp. 491
An Unrelated Puzzlep. 492
Binomial Queuesp. 492
Skew Heapsp. 497
Fibonacci Heapsp. 499
Cutting Nodes in Leftist Heapsp. 500
Lazy Merging for Binomial Queuesp. 502
The Fibonacci Heap Operationsp. 506
Proof of the Time Boundp. 506
Splay Treesp. 509
Summaryp. 513
Exercisesp. 513
Referencesp. 515
Advanced Data Structures and Implementationp. 517
Top-Down Splay Treesp. 517
Red-Black Treesp. 525
Bottom-Up Insertionp. 526
Top-Down Red-Black Treesp. 527
Top-Down Deletionp. 531
Deterministic Skip Listsp. 535
AA-Treesp. 540
Treapsp. 547
k-d Treesp. 549
Pairing Heapsp. 553
Summaryp. 558
Exercisesp. 558
Referencesp. 563
Separate Compilation of Class Templatesp. 567
Everything in the Headerp. 568
Explicit Instantiationp. 568
The export Directivep. 570
Indexp. 571
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program