32, 535 software engineering, xiii, 4, 19, 544 sorting, 17, 21, 22, 57, 61, 62, 76–77, 79, 82, 231–271, 313, 322, 544–546 adaptive, 265 comparing algorithms, 232–233, 259–261, 302 exchange sorting, 238–239 external, xv, 168, 232, 251, 273, 291–303, 306–308 internal, xv lower bound, 232, 261–265 small data sets, 233, 250, 265, 268 stable algorithms, 232, 266 terminology, 232–233 spatial data structure, 437, 448–461 splay tree, 178, 196, 359, 437, 442, 445–448, 461, 462, 464, 469, 525 stable sorting alorithms, see sorting, stable algorithms stack, 95, 103, 120–128, 147, 197, 200, 250, 266, 267, 270, 393–395, 485 array-based, 121–122 constructor, 121 implementations compared, 124 insert, 120 linked, 123, 124 pop, 120–122, 124, 149 push, 120–122, 124, 149 remove, 120 terminology, 120 top, 120–122, 124 two in one array, 124, 147 variable-size elements, 148 Strassen’s algorithm, 532, 541 strategy, see design pattern, strategy subclass, see object-oriented programming, class hierarchy subset, see set, subset suffix tree, 463 summation, 32–34, 41, 42, 51, 72, 73, 90, 177, 184, 248, 249, 318, 319, 417, 469–474, 479, 481, 482, 484, 485, 487 guess and test, 487 list of solutions, 33, 34 notation, 32 shifting method, 471–474, 483, 488 swap, 30 tape drive, 276, 291 template, 114 templates, xvi, 12, 97 text compression, 151, 185–195, 322–323, 345, 349 Θ notation, 68–70, 89 topological sort, 381, 394–398, 410 total order, 28, 49, 179 Towers of Hanoi, 36–38, 126, 543, 550 tradeoff, xiii, 3, 13, 75, 279, 292 disk-based space/time principle, 82, 343 space/time principle, 81–82, 97, 120, 185, 343 transportation network, 381, 399 transpose, 321, 322, 346 traveling salesman, 551–553, 560, 561, 571, 573 traversal binary tree, 126, 151, 155–160, 163, 169, 177, 197, 390 enumeration, 155, 169, 220 general tree, 205–206, 223 graph, 381, 390–398 tree height balanced, 364, 365, 367, 525 terminology, 151