书海网短评:
适读人群:本书概念清楚,逻辑性强,内容新颖,适合作为大专院校计算机软件与计算机应用等相关专业的双语教材或参考书,也适合计算机工程技术人员参考。本版特色如下:*书中的阐述和算法均用C++新标准C++11的代码实现。
《数据结构与算法分析 C++语言描述(第四版)(英文版)》是数据结构和算法分析的经典教材,书中使用主流的程序设计语言C++作为具体的实现语言。书中内容包括表、栈、队列、树、散列表、优先队列、排序、不相交集算法、图论算法、算法分析、算法设计、摊还分析、查找树算法、后缀数组、后缀树、k-d树和配对堆等。《数据结构与算法分析 C++语言描述(第四版)(英文版)》把算法分析与C++程序的开发有机地结合起来,深入分析每种算法,内容全面、缜密严格,并细致讲解精心构造程序的方法。
MarkAllenWeiss,佛罗里达国际大学计算与信息科学学院教授、副院长,本科教育主任和研究生教育主任。他于1987年获得普林斯顿大学计算机科学博士学位,师从BobSedgewick。他曾经担任全美AP(AdvancedPlacement)考试计算机学科委员会的主席(2000-2004)。Weiss教授在数据结构和算法分析方面卓有建树,他的数据结构和算法分析的著作尤其畅销,并受到广泛好评.已被世界500余所大学用作教材。
Chapter1Programming:AGeneralOverview1
1.1What’sThisBookAbout?1
1.2MathematicsReview2
1.2.1Exponents3
1.2.2Logarithms3
1.2.3Series4
1.2.4ModularArithmetic5
1.2.5ThePWord6
1.3ABriefIntroductiontoRecursion8
1.4C++Classes12
1.4.1BasicclassSyntax12
1.4.2ExtraConstructorSyntaxandAccessors13
1.4.3SeparationofInterfaceandImplementation16
1.4.4vectorandstring19
1.5C++Details21
1.5.1Pointers21
1.5.2Lvalues,Rvalues,andReferences23
1.5.3ParameterPassing25
1.5.4ReturnPassing27
1.5.5std::swapandstd::move29
1.5.6TheBig-Five:Destructor,CopyConstructor,MoveConstructor,Copy
Assignmentoperator=,MoveAssignmentoperator=30
1.5.7C-styleArraysandStrings35
1.6Templates36
1.6.1FunctionTemplates37
1.6.2ClassTemplates38
1.6.3Object,Comparable,andanExample39
1.6.4FunctionObjects41
1.6.5SeparateCompilationofClassTemplates44
1.7UsingMatrices44
1.7.1TheDataMembers,Constructor,andBasicAccessors44
1.7.2operator[]45
1.7.3Big-Five46
Summary46
Exercises46
References48
Chapter2AlgorithmAnalysis51
2.1MathematicalBackground51
2.2Model54
2.3WhattoAnalyze54
2.4Running-TimeCalculations57
2.4.1ASimpleExample58
2.4.2GeneralRules58
2.4.3SolutionsfortheMaximumSubsequence
SumProblem60
2.4.4LogarithmsintheRunningTime66
2.4.5LimitationsofWorst-CaseAnalysis70
Summary70
Exercises71
References76
Chapter3Lists,Stacks,andQueues77
3.1AbstractDataTypes(ADTs)77
3.2TheListADT78
3.2.1SimpleArrayImplementationofLists78
3.2.2SimpleLinkedLists79
3.3vectorandlistintheSTL80
3.3.1Iterators82
3.3.2Example:UsingeraseonaList83
3.3.3const_iterators84
3.4Implementationofvector86
3.5Implementationoflist91
3.6TheStackADT103
3.6.1StackModel103
3.6.2ImplementationofStacks104
3.6.3Applications104
3.7TheQueueADT112
3.7.1QueueModel113
3.7.2ArrayImplementationofQueues113
3.7.3ApplicationsofQueues115
Summary116
Exercises116
Chapter4Trees121
4.1Preliminaries121
4.1.1ImplementationofTrees122
4.1.2TreeTraversalswithanApplication123
4.2BinaryTrees126
4.2.1Implementation128
4.2.2AnExample:ExpressionTrees128
4.3TheSearchTreeADT?aBinarySearchTrees132
4.3.1contains134
4.3.2findMinandfindMax135
4.3.3insert136
4.3.4remove139
4.3.5DestructorandCopyConstructor141
4.3.6Average-CaseAnalysis141
4.4AVLTrees144
4.4.1SingleRotation147
4.4.2DoubleRotation149
4.5SplayTrees158
4.5.1ASimpleIdea(ThatDoesNotWork)158
4.5.2Splaying160
4.6TreeTraversals(Revisited)166
4.7B-Trees168
4.8SetsandMapsintheStandardLibrary173
4.8.1Sets173
4.8.2Maps174
4.8.3Implementationofsetandmap175
4.8.4AnExampleThatUsesSeveralMaps176
Summary181
Exercises182
References189
Chapter5Hashing193
5.1GeneralIdea193
5.2HashFunction194
5.3SeparateChaining196
5.4HashTableswithoutLinkedLists201
5.4.1LinearProbing201
5.4.2QuadraticProbing202
5.4.3DoubleHashing207
5.5Rehashing208
5.6HashTablesintheStandardLibrary210
5.7HashTableswithWorst-CaseO(1)Access212
5.7.1PerfectHashing213
5.7.2CuckooHashing215
5.7.3HopscotchHashing227
5.8UniversalHashing230
5.9ExtendibleHashing233
Summary236
Exercises237
References241
Chapter6PriorityQueues(Heaps)245
6.1Model245
6.2SimpleImplementations246
6.3BinaryHeap247
6.3.1StructureProperty247
6.3.2Heap-OrderProperty248
6.3.3BasicHeapOperations249
6.3.4OtherHeapOperations252
6.4ApplicationsofPriorityQueues257
6.4.1TheSelectionProblem258
6.4.2EventSimulation259
6.5d-Heaps260
6.6LeftistHeaps261
6.6.1LeftistHeapProperty261
6.6.2LeftistHeapOperations262
6.7SkewHeaps269
6.8BinomialQueues271
6.8.1BinomialQueueStructure271
6.8.2BinomialQueueOperations271
6.8.3ImplementationofBinomialQueues276
6.9PriorityQueuesintheStandardLibrary282
Summary283
Exercises283
References288
Chapter7Sorting291
7.1Preliminaries291
7.2InsertionSort292
7.2.1TheAlgorithm292
7.2.2STLImplementationofInsertionSort293
7.2.3AnalysisofInsertionSort294
7.3ALowerBoundforSimpleSortingAlgorithms295
7.4Shellsort296
7.4.1Worst-CaseAnalysisofShellsort297
7.5Heapsort300
7.5.1AnalysisofHeapsort301
7.6Mergesort304
7.6.1AnalysisofMergesort306
7.7Quicksort309
7.7.1PickingthePivot311
7.7.2PartitioningStrategy313
7.7.3SmallArrays315
7.7.4ActualQuicksortRoutines315
7.7.5AnalysisofQuicksort318
7.7.6ALinear-Expected-TimeAlgorithmforSelection321
7.8AGeneralLowerBoundforSorting323
7.8.1DecisionTrees323
7.9Decision-TreeLowerBoundsforSelectionProblems325
7.10AdversaryLowerBounds328
7.11Linear-TimeSorts:BucketSortandRadixSort331
7.12ExternalSorting336
7.12.1WhyWeNeedNewAlgorithms336
7.12.2ModelforExternalSorting336
7.12.3TheSimpleAlgorithm337
7.12.4MultiwayMerge338
7.12.5PolyphaseMerge339
7.12.6ReplacementSelection340
Summary341
Exercises341
References347
Chapter8TheDisjointSetsClass351
8.1EquivalenceRelations351
8.2TheDynamicEquivalenceProblem352
8.3BasicDataStructure353
8.4SmartUnionAlgorithms357
8.5PathCompression360
8.6WorstCaseforUnion-by-RankandPathCompression361
8.6.1SlowlyGrowingFunctions362
8.6.2AnAnalysisbyRecursiveDecomposition362
8.6.3AnO(Mlog*N)Bound369
8.6.4AnO(M|á(M,N))Bound370
8.7AnApplication372
Summary374
Exercises375
References376
Chapter9GraphAlgorithms379
9.1Definitions379
9.1.1RepresentationofGraphs380
9.2TopologicalSort382
9.3Shortest-PathAlgorithms386
9.3.1UnweightedShortestPaths387
9.3.2Dijkstra’sAlgorithm391
9.3.3GraphswithNegativeEdgeCosts400
9.3.4AcyclicGraphs400
9.3.5All-PairsShortestPath404
9.3.6ShortestPathExample404
9.4NetworkFlowProblems406
9.4.1ASimpleMaximum-FlowAlgorithm408
9.5MinimumSpanningTree413
9.5.1Prim’sAlgorithm414
9.5.2Kruskal’sAlgorithm417
9.6ApplicationsofDepth-FirstSearch419
9.6.1UndirectedGraphs420
9.6.2Biconnectivity421
9.6.3EulerCircuits425
9.6.4DirectedGraphs429
9.6.5FindingStrongComponents431
9.7IntroductiontoNP-Completeness432
9.7.1Easyvs.Hard433
9.7.2TheClassNP434
9.7.3NP-CompleteProblems434
Summary437
Exercises437
References445
Chapter10AlgorithmDesignTechniques449
10.1GreedyAlgorithms449
10.1.1ASimpleSchedulingProblem450
10.1.2HuffmanCodes453
10.1.3ApproximateBinPacking459
10.2DivideandConquer467
10.2.1RunningTimeofDivide-and-ConquerAlgorithms468
10.2.2Closest-PointsProblem470
10.2.3TheSelectionProblem475
10.2.4TheoreticalImprovementsforArithmeticProblems478
10.3DynamicProgramming482
10.3.1UsingaTableInsteadofRecursion483
10.3.2OrderingMatrixMultiplications485
10.3.3OptimalBinarySearchTree487
10.3.4All-PairsShortestPath491
10.4RandomizedAlgorithms494
10.4.1Random-NumberGenerators495
10.4.2SkipLists500
10.4.3PrimalityTesting503
10.5BacktrackingAlgorithms506
10.5.1TheTurnpikeReconstructionProblem506
10.5.2Games511
Summary518
Exercises518
References527
Chapter11AmortizedAnalysis533
11.1AnUnrelatedPuzzle534
11.2BinomialQueues534
11.3SkewHeaps539
11.4FibonacciHeaps541
11.4.1CuttingNodesinLeftistHeaps542
11.4.2LazyMergingforBinomialQueues544
11.4.3TheFibonacciHeapOperations548
11.4.4ProofoftheTimeBound549
11.5SplayTrees551
Summary555
Exercises556
References557
Chapter12AdvancedDataStructures
andImplementation559
12.1Top-DownSplayTrees559
12.2Red-BlackTrees566
12.2.1Bottom-UpInsertion567
12.2.2Top-DownRed-BlackTrees568
12.2.3Top-DownDeletion570
12.3Treaps576
12.4SuffixArraysandSuffixTrees579
12.4.1SuffixArrays580
12.4.2SuffixTrees583
12.4.3Linear-TimeConstructionofSuffixArraysandSuffixTrees586
12.5k-dTrees596
12.6PairingHeaps602
Summary606
Exercises608
References612
AppendixASeparateCompilationof
ClassTemplates615
A.1EverythingintheHeader616
A.2ExplicitInstantiation616
Index619









