- Page 1 and 2:
Data Structures and AlgorithmAnalys
- Page 3 and 4:
ivContents2.6.1 Direct Proof 372.6.
- Page 5 and 6:
viContents6.1 General Tree Definiti
- Page 7 and 8:
viiiContents10.5.2 B-Tree Analysis
- Page 9 and 10:
xContents15.7 Optimal Sorting 50115
- Page 12 and 13:
PrefaceWe study data structures so
- Page 14 and 15:
PrefacexvA sophomore-level class wh
- Page 16 and 17:
Prefacexviithe form ofcalls to meth
- Page 18:
PrefacexixFor the second edition, I
- Page 22 and 23:
1Data Structures and AlgorithmsHow
- Page 24 and 25:
Sec. 1.1 A Philosophy of Data Struc
- Page 26 and 27:
Sec. 1.1 A Philosophy of Data Struc
- Page 28 and 29:
Sec. 1.2 Abstract Data Types and Da
- Page 30 and 31:
Sec. 1.2 Abstract Data Types and Da
- Page 32 and 33:
Sec. 1.3 Design Patterns 13that tra
- Page 34 and 35:
Sec. 1.3 Design Patterns 15will cal
- Page 36 and 37:
Sec. 1.4 Problems, Algorithms, and
- Page 38 and 39:
Sec. 1.5 Further Reading 19vides po
- Page 40 and 41:
Sec. 1.6 Exercises 21than 10,000 of
- Page 42 and 43:
2Mathematical PreliminariesThis cha
- Page 44 and 45:
Sec. 2.1 Sets and Relations 25A seq
- Page 46 and 47:
Sec. 2.2 Miscellaneous Notation 27E
- Page 48 and 49:
Sec. 2.3 Logarithms 29Unfortunately
- Page 50 and 51:
Sec. 2.4 Summations and Recurrences
- Page 52 and 53:
Sec. 2.4 Summations and Recurrences
- Page 54 and 55:
Sec. 2.5 Recursion 35(a)(b)Figure 2
- Page 56 and 57:
Sec. 2.6 Mathematical Proof Techniq
- Page 58 and 59:
Sec. 2.6 Mathematical Proof Techniq
- Page 60 and 61:
Sec. 2.6 Mathematical Proof Techniq
- Page 62 and 63:
Sec. 2.6 Mathematical Proof Techniq
- Page 64 and 65:
Sec. 2.8 Further Reading 45one inch
- Page 66 and 67:
Sec. 2.9 Exercises 47(c) For nonzer
- Page 68 and 69:
Sec. 2.9 Exercises 492.16 Write a r
- Page 70 and 71:
Sec. 2.9 Exercises 512.38 How many
- Page 72 and 73:
3Algorithm AnalysisHow long will it
- Page 74 and 75:
Sec. 3.1 Introduction 55efficient.
- Page 76 and 77:
Sec. 3.1 Introduction 57n! 2 n2n 25
- Page 78 and 79:
Sec. 3.2 Best, Worst, and Average C
- Page 80 and 81:
Sec. 3.3 A Faster Computer, or a Fa
- Page 82 and 83:
Sec. 3.4 Asymptotic Analysis 633.4
- Page 84 and 85:
Sec. 3.4 Asymptotic Analysis 65If s
- Page 86 and 87:
Sec. 3.4 Asymptotic Analysis 67it i
- Page 88 and 89:
Sec. 3.5 Calculating the Running Ti
- Page 90 and 91:
Sec. 3.5 Calculating the Running Ti
- Page 92 and 93:
Sec. 3.5 Calculating the Running Ti
- Page 94 and 95:
Sec. 3.7 Common Misunderstandings 7
- Page 96 and 97:
Sec. 3.8 Multiple Parameters 77the
- Page 98 and 99:
Sec. 3.9 Space Bounds 79A data stru
- Page 100 and 101:
Sec. 3.10 Speeding Up Your Programs
- Page 102 and 103:
Sec. 3.11 Empirical Analysis 833.11
- Page 104 and 105:
Sec. 3.13 Exercises 853.13 Exercise
- Page 106 and 107:
Sec. 3.13 Exercises 87(f) sum = 0;f
- Page 108:
Sec. 3.14 Projects 893.24 Prove tha
- Page 112 and 113:
4Lists, Stacks, and QueuesIf your p
- Page 114 and 115:
Sec. 4.1 Lists 95list ADT. Interfac
- Page 116 and 117:
Sec. 4.1 Lists 97for (L.moveToStart
- Page 118 and 119:
Sec. 4.1 Lists 99public void moveTo
- Page 120 and 121:
Sec. 4.1 Lists 101/** Singly linked
- Page 122 and 123:
Sec. 4.1 Lists 103headcurrtailhead2
- Page 124 and 125:
Sec. 4.1 Lists 105/** Set curr at l
- Page 126 and 127:
Sec. 4.1 Lists 107curr...23 10 12(a
- Page 128 and 129:
Sec. 4.1 Lists 109/** Singly linked
- Page 130 and 131:
Sec. 4.1 Lists 111Array-based lists
- Page 132 and 133:
Sec. 4.1 Lists 113headcurrtail20 23
- Page 134 and 135:
Sec. 4.1 Lists 115/** Insert "it" a
- Page 136 and 137:
Sec. 4.2 Stacks 117The principle be
- Page 138 and 139:
Sec. 4.2 Stacks 119/** Array-based
- Page 140 and 141:
Sec. 4.2 Stacks 121top1top2Figure 4
- Page 142 and 143:
Sec. 4.2 Stacks 123you might want t
- Page 144 and 145:
Sec. 4.3 Queues 125/** Queue ADT */
- Page 146 and 147:
Sec. 4.3 Queues 127frontfront20 512
- Page 148 and 149:
Sec. 4.3 Queues 129/** Array-based
- Page 150 and 151:
Sec. 4.4 Dictionaries 1314.3.3 Comp
- Page 152 and 153:
Sec. 4.4 Dictionaries 133not get at
- Page 154 and 155:
Sec. 4.4 Dictionaries 135/** Contai
- Page 156 and 157:
Sec. 4.4 Dictionaries 137}/** @retu
- Page 158 and 159:
Sec. 4.6 Exercises 139(b) L2.append
- Page 160 and 161:
Sec. 4.7 Projects 1414.16 Re-implem
- Page 162:
Sec. 4.7 Projects 143‘a’ ‘b
- Page 165 and 166:
146 Chap. 5 Binary TreesABCDEFGHIFi
- Page 167 and 168:
148 Chap. 5 Binary TreesAny number
- Page 169 and 170:
150 Chap. 5 Binary Trees/** ADT for
- Page 171 and 172:
152 Chap. 5 Binary Treestends to be
- Page 173 and 174:
154 Chap. 5 Binary Trees5.3 Binary
- Page 175 and 176:
156 Chap. 5 Binary TreesABCDEFGHIFi
- Page 177 and 178:
158 Chap. 5 Binary Treesto its call
- Page 179 and 180:
160 Chap. 5 Binary Trees5.3.2 Space
- Page 181 and 182:
162 Chap. 5 Binary Trees012345 678
- Page 183 and 184:
164 Chap. 5 Binary Trees12037422442
- Page 185 and 186:
166 Chap. 5 Binary Trees37244273240
- Page 187 and 188:
168 Chap. 5 Binary Treessubroot105
- Page 189 and 190:
170 Chap. 5 Binary Treesin the case
- Page 191 and 192:
172 Chap. 5 Binary Treessynonymous
- Page 193 and 194:
174 Chap. 5 Binary Trees/** Heapify
- Page 195 and 196:
176 Chap. 5 Binary TreesRH1H2Figure
- Page 197 and 198:
178 Chap. 5 Binary Trees5.6 Huffman
- Page 199 and 200:
180 Chap. 5 Binary TreesLetter C D
- Page 201 and 202:
182 Chap. 5 Binary Trees/** Huffman
- Page 203 and 204:
184 Chap. 5 Binary Trees/** Build a
- Page 205 and 206:
186 Chap. 5 Binary Treesa reverse p
- Page 207 and 208:
188 Chap. 5 Binary Trees18 bits, mo
- Page 209 and 210:
190 Chap. 5 Binary Trees5.12 Write
- Page 211 and 212:
192 Chap. 5 Binary Trees(c) What is
- Page 213 and 214:
194 Chap. 5 Binary Trees5.7 Complet
- Page 215 and 216:
196 Chap. 6 Non-Binary TreesRootRAn
- Page 217 and 218:
198 Chap. 6 Non-Binary TreesRABCD E
- Page 219 and 220:
200 Chap. 6 Non-Binary Trees/** Gen
- Page 221 and 222:
202 Chap. 6 Non-Binary Treesspond t
- Page 223 and 224:
204 Chap. 6 Non-Binary Treesditiona
- Page 225 and 226:
206 Chap. 6 Non-Binary Treeslence o
- Page 227 and 228:
208 Chap. 6 Non-Binary TreesR’RA
- Page 229 and 230:
210 Chap. 6 Non-Binary TreesRRABABC
- Page 231 and 232:
212 Chap. 6 Non-Binary Trees(a)(b)F
- Page 233 and 234:
214 Chap. 6 Non-Binary Treestwo chi
- Page 235 and 236:
216 Chap. 6 Non-Binary Treeschild v
- Page 237 and 238:
218 Chap. 6 Non-Binary TreesCAFBEHG
- Page 239 and 240:
220 Chap. 6 Non-Binary Treestree af
- Page 242 and 243:
7Internal SortingWe sort many thing
- Page 244 and 245:
Sec. 7.2 Three Θ(n 2 ) Sorting Alg
- Page 246 and 247:
Sec. 7.2 Three Θ(n 2 ) Sorting Alg
- Page 248 and 249:
Sec. 7.2 Three Θ(n 2 ) Sorting Alg
- Page 250 and 251:
Sec. 7.3 Shellsort 231Insertion Bub
- Page 252 and 253:
Sec. 7.4 Mergesort 233static
- Page 254 and 255:
Sec. 7.4 Mergesort 235static
- Page 256 and 257:
Sec. 7.5 Quicksort 237Quicksort is
- Page 258 and 259:
Sec. 7.5 Quicksort 239static
- Page 260 and 261:
Sec. 7.5 Quicksort 241is still unli
- Page 262 and 263:
Sec. 7.6 Heapsort 243subarray, only
- Page 264 and 265:
Sec. 7.7 Binsort and Radix Sort 245
- Page 266 and 267:
Sec. 7.7 Binsort and Radix Sort 247
- Page 268 and 269:
Sec. 7.7 Binsort and Radix Sort 249
- Page 270 and 271:
Sec. 7.8 An Empirical Comparison of
- Page 272 and 273:
Sec. 7.9 Lower Bounds for Sorting 2
- Page 274 and 275:
Sec. 7.9 Lower Bounds for Sorting 2
- Page 276 and 277:
Sec. 7.10 Further Reading 257• Eq
- Page 278 and 279:
Sec. 7.11 Exercises 259algorithm to
- Page 280 and 281:
Sec. 7.12 Projects 2617.18 Which of
- Page 282:
Sec. 7.12 Projects 2637.6 It has be
- Page 285 and 286:
266 Chap. 8 File Processing and Ext
- Page 287 and 288:
268 Chap. 8 File Processing and Ext
- Page 289 and 290:
270 Chap. 8 File Processing and Ext
- Page 291 and 292:
272 Chap. 8 File Processing and Ext
- Page 293 and 294:
274 Chap. 8 File Processing and Ext
- Page 295 and 296:
276 Chap. 8 File Processing and Ext
- Page 297 and 298:
278 Chap. 8 File Processing and Ext
- Page 299 and 300:
280 Chap. 8 File Processing and Ext
- Page 301 and 302:
282 Chap. 8 File Processing and Ext
- Page 303 and 304:
284 Chap. 8 File Processing and Ext
- Page 305 and 306:
286 Chap. 8 File Processing and Ext
- Page 307 and 308: 288 Chap. 8 File Processing and Ext
- Page 309 and 310: 290 Chap. 8 File Processing and Ext
- Page 311 and 312: 292 Chap. 8 File Processing and Ext
- Page 313 and 314: 294 Chap. 8 File Processing and Ext
- Page 315 and 316: 296 Chap. 8 File Processing and Ext
- Page 317 and 318: 298 Chap. 8 File Processing and Ext
- Page 319 and 320: 300 Chap. 8 File Processing and Ext
- Page 321 and 322: 302 Chap. 9 Searchingintroduced in
- Page 323 and 324: 304 Chap. 9 Searchingvalue in L gre
- Page 325 and 326: 306 Chap. 9 SearchingWe now show th
- Page 327 and 328: 308 Chap. 9 Searchingrecords by exp
- Page 329 and 330: 310 Chap. 9 SearchingThis is potent
- Page 331 and 332: 312 Chap. 9 Searchingand the total
- Page 333 and 334: 314 Chap. 9 SearchingThis method of
- Page 335 and 336: 316 Chap. 9 Searchingbirthday is si
- Page 337 and 338: 318 Chap. 9 Searching45674567319692
- Page 339 and 340: 320 Chap. 9 Searching01000953012330
- Page 341 and 342: 322 Chap. 9 Searching01HashTable100
- Page 343 and 344: 324 Chap. 9 Searching/** Insert rec
- Page 345 and 346: 326 Chap. 9 Searching09050090501100
- Page 347 and 348: 328 Chap. 9 SearchingExample 9.9 Co
- Page 349 and 350: 330 Chap. 9 Searching/** Dictionary
- Page 351 and 352: 332 Chap. 9 SearchingThe cost for a
- Page 353 and 354: 334 Chap. 9 Searchingthat is not in
- Page 355 and 356: 336 Chap. 9 SearchingA good introdu
- Page 357: 338 Chap. 9 Searching9.16 Assume th
- Page 361 and 362: 342 Chap. 10 Indexingcould be sorte
- Page 363 and 364: 344 Chap. 10 Indexing1 2003 5894 10
- Page 365 and 366: 346 Chap. 10 IndexingSecondaryKey I
- Page 367 and 368: 348 Chap. 10 Indexingamong the cyli
- Page 369 and 370: 350 Chap. 10 Indexing18331223 30 48
- Page 371 and 372: 352 Chap. 10 Indexingprivate E find
- Page 373 and 374: 354 Chap. 10 Indexing18332320233020
- Page 375 and 376: 356 Chap. 10 Indexing/** Add a new
- Page 377 and 378: 358 Chap. 10 IndexingNote that this
- Page 379 and 380: 360 Chap. 10 Indexingprivate E find
- Page 381 and 382: 362 Chap. 10 Indexing3318 23 481012
- Page 383 and 384: 364 Chap. 10 Indexingneighboring si
- Page 385 and 386: 366 Chap. 10 Indexingnumber of reco
- Page 387 and 388: 368 Chap. 10 Indexing10.2 Implement
- Page 390 and 391: 11GraphsGraphs provide the ultimate
- Page 392 and 393: Sec. 11.1 Terminology and Represent
- Page 394 and 395: Sec. 11.1 Terminology and Represent
- Page 396 and 397: Sec. 11.2 Graph Implementations 377
- Page 398 and 399: Sec. 11.2 Graph Implementations 379
- Page 400 and 401: Sec. 11.3 Graph Traversals 381/** A
- Page 402 and 403: Sec. 11.3 Graph Traversals 383works
- Page 404 and 405: Sec. 11.3 Graph Traversals 385ACall
- Page 406 and 407: Sec. 11.3 Graph Traversals 387AInit
- Page 408 and 409:
Sec. 11.4 Shortest-Paths Problems 3
- Page 410 and 411:
Sec. 11.4 Shortest-Paths Problems 3
- Page 412 and 413:
Sec. 11.5 Minimum-Cost Spanning Tre
- Page 414 and 415:
Sec. 11.5 Minimum-Cost Spanning Tre
- Page 416 and 417:
Sec. 11.5 Minimum-Cost Spanning Tre
- Page 418 and 419:
Sec. 11.6 Further Reading 399/** He
- Page 420 and 421:
Sec. 11.7 Exercises 4012 5110320410
- Page 422:
Sec. 11.8 Projects 403component’s
- Page 425 and 426:
406 Chap. 12 Lists and Arrays Revis
- Page 427 and 428:
408 Chap. 12 Lists and Arrays Revis
- Page 429 and 430:
410 Chap. 12 Lists and Arrays Revis
- Page 431 and 432:
412 Chap. 12 Lists and Arrays Revis
- Page 433 and 434:
414 Chap. 12 Lists and Arrays Revis
- Page 435 and 436:
416 Chap. 12 Lists and Arrays Revis
- Page 437 and 438:
418 Chap. 12 Lists and Arrays Revis
- Page 439 and 440:
420 Chap. 12 Lists and Arrays Revis
- Page 441 and 442:
422 Chap. 12 Lists and Arrays Revis
- Page 443 and 444:
424 Chap. 12 Lists and Arrays Revis
- Page 445 and 446:
426 Chap. 12 Lists and Arrays Revis
- Page 447 and 448:
428 Chap. 12 Lists and Arrays Revis
- Page 449 and 450:
430 Chap. 13 Advanced Tree Structur
- Page 451 and 452:
432 Chap. 13 Advanced Tree Structur
- Page 453 and 454:
434 Chap. 13 Advanced Tree Structur
- Page 455 and 456:
436 Chap. 13 Advanced Tree Structur
- Page 457 and 458:
438 Chap. 13 Advanced Tree Structur
- Page 459 and 460:
440 Chap. 13 Advanced Tree Structur
- Page 461 and 462:
442 Chap. 13 Advanced Tree Structur
- Page 463 and 464:
444 Chap. 13 Advanced Tree Structur
- Page 465 and 466:
446 Chap. 13 Advanced Tree Structur
- Page 467 and 468:
448 Chap. 13 Advanced Tree Structur
- Page 469 and 470:
450 Chap. 13 Advanced Tree Structur
- Page 471 and 472:
452 Chap. 13 Advanced Tree Structur
- Page 473 and 474:
454 Chap. 13 Advanced Tree Structur
- Page 475 and 476:
456 Chap. 13 Advanced Tree Structur
- Page 478:
PART VTheory of Algorithms459
- Page 481 and 482:
462 Chap. 14 Analysis Techniques14.
- Page 483 and 484:
464 Chap. 14 Analysis TechniquesDiv
- Page 485 and 486:
466 Chap. 14 Analysis TechniquesExa
- Page 487 and 488:
468 Chap. 14 Analysis TechniquesT(2
- Page 489 and 490:
470 Chap. 14 Analysis TechniquesIf
- Page 491 and 492:
472 Chap. 14 Analysis Techniquesf(n
- Page 493 and 494:
474 Chap. 14 Analysis TechniquesThe
- Page 495 and 496:
476 Chap. 14 Analysis Techniques14.
- Page 497 and 498:
478 Chap. 14 Analysis Techniquespar
- Page 499 and 500:
480 Chap. 14 Analysis Techniques14.
- Page 501 and 502:
482 Chap. 14 Analysis Techniques(b)
- Page 504 and 505:
15Lower BoundsHow do I know if I ha
- Page 506 and 507:
Sec. 15.1 Introduction to Lower Bou
- Page 508 and 509:
Sec. 15.2 Lower Bounds on Searching
- Page 510 and 511:
Sec. 15.3 Finding the Maximum Value
- Page 512 and 513:
Sec. 15.4 Adversarial Lower Bounds
- Page 514 and 515:
Sec. 15.4 Adversarial Lower Bounds
- Page 516 and 517:
Sec. 15.5 State Space Lower Bounds
- Page 518 and 519:
Sec. 15.6 Finding the ith Best Elem
- Page 520 and 521:
Sec. 15.7 Optimal Sorting 501While
- Page 522 and 523:
Sec. 15.7 Optimal Sorting 503ABAorA
- Page 524 and 525:
Sec. 15.9 Exercises 505things by as
- Page 526:
Sec. 15.10 Projects 50715.10 Projec
- Page 529 and 530:
510 Chap. 16 Patterns of Algorithms
- Page 531 and 532:
512 Chap. 16 Patterns of Algorithms
- Page 533 and 534:
514 Chap. 16 Patterns of Algorithms
- Page 535 and 536:
516 Chap. 16 Patterns of Algorithms
- Page 537 and 538:
518 Chap. 16 Patterns of Algorithms
- Page 539 and 540:
520 Chap. 16 Patterns of Algorithms
- Page 541 and 542:
522 Chap. 16 Patterns of Algorithms
- Page 543 and 544:
524 Chap. 16 Patterns of Algorithms
- Page 545 and 546:
526 Chap. 16 Patterns of Algorithms
- Page 547 and 548:
528 Chap. 16 Patterns of Algorithms
- Page 549 and 550:
530 Chap. 16 Patterns of Algorithms
- Page 551 and 552:
532 Chap. 16 Patterns of Algorithms
- Page 554 and 555:
17Limits to ComputationThis book de
- Page 556 and 557:
Sec. 17.1 Reductions 53723421793881
- Page 558 and 559:
Sec. 17.1 Reductions 539Problem A:I
- Page 560 and 561:
Sec. 17.2 Hard Problems 541Our next
- Page 562 and 563:
Sec. 17.2 Hard Problems 543exponent
- Page 564 and 565:
Sec. 17.2 Hard Problems 545so this
- Page 566 and 567:
Sec. 17.2 Hard Problems 547for TRAV
- Page 568 and 569:
Sec. 17.2 Hard Problems 549strategy
- Page 570 and 571:
Sec. 17.2 Hard Problems 551x 1x 1x
- Page 572 and 573:
Sec. 17.2 Hard Problems 553organize
- Page 574 and 575:
Sec. 17.3 Impossible Problems 555al
- Page 576 and 577:
Sec. 17.3 Impossible Problems 557ar
- Page 578 and 579:
Sec. 17.3 Impossible Problems 55917
- Page 580 and 581:
Sec. 17.4 Further Reading 561a func
- Page 582 and 583:
Sec. 17.5 Exercises 56317.8 A Hamil
- Page 584:
Sec. 17.6 Projects 565by using a br
- Page 587 and 588:
568 BIBLIOGRAPHY[BM85] John Louis B
- Page 589 and 590:
570 BIBLIOGRAPHY[LLKS85] E.L. Lawle
- Page 591 and 592:
572 BIBLIOGRAPHY[WMB99][Zei07]I.H.
- Page 593 and 594:
574 INDEXparent pointer, 154space r
- Page 595 and 596:
576 INDEXfree tree, 373, 393, 399fr
- Page 597 and 598:
578 INDEXnode, 100-103, 113, 114not
- Page 599 and 600:
580 INDEXRadix Sort, 247-252, 254,
- Page 601:
582 INDEXtype, 8uncountability, 556