Beyond the book

Several structures and algorithms that the book does not describe, but that a course on the subject usually covers (e.g., the realizations with cursors, the parenthesized lists of trees, the general schemes of the techniques), are written on the same classes and tested in test/beyond.cpp.

What

Header

Test

binary tree in a positional vector

tree/ArrayBinaryTree.h

beyond.array-binary-tree

binary and ordered trees with cursors

tree/CursorBinaryTree.h, tree/CursorTree.h

beyond.cursor-*

ordered tree in a vector in preorder

tree/PreorderArrayTree.h

beyond.preorder-array-tree

heap on a binary tree with pointers

priority/LinkedHeapPriorityQueue.h

beyond.linked-heap

graph of node objects with pointers

graph/PointerGraph.h

beyond.pointer-graph

k stacks in one vector

stack/MultiStack.h

beyond.multistack

search, order, bubble and natural merge sort on sequences

sequence/SequenceAlgorithms.h

beyond.sequence-*

palindromes and sorting with a stack

stack/StackAlgorithms.h

beyond.stack-algorithms

naive and Knuth-Morris-Pratt string matching

string/StringMatching.h

beyond.string-matching

exercises on lists, strings, trees and arrays

test/beyond.cpp

beyond.*-exercises, beyond.even-odd-strings

list with cursors in a shared space with a free list

sequence/CursorList.h

beyond.cursor-list, ch04.spec.CursorList

range of C++ over any sequence

sequence/SequenceRange.h

beyond.sequence-range

search with the place of insertion and sublists of a sorted sequence

sequence/SequenceAlgorithms.h

beyond.sorted-list

postfix expressions, infix to postfix (shunting-yard)

stack/Expressions.h

beyond.postfix

queue with no duplicates, positive items of a queue

queue/UniqueQueue.h, queue/QueueAlgorithms.h

beyond.queue-algorithms

dictionary on a sorted vector, pseudo-random inspection

dictionary/SortedArrayDictionary.h, dictionary/OpenHashTable.h

beyond.sorted-array-dictionary, beyond.hashing

decision tree of the binary search

search/BinarySearch.h

beyond.decision-tree

trees as parenthesized lists, tree of an expression, tree with lists of children

tree/BinaryTree.h, tree/ExpressionTree.h, tree/ChildListTree.h

beyond.list-forms, beyond.expression-tree, beyond.child-list-tree

union by size in the MFSET

mfset/MFSet.h

contract_mfset.mfset

general visit of a graph, unilateral connection

graph/Visit.h

beyond.generic-visit, beyond.unilateral-incidence

general schemes of the techniques (enumeration, backtracking, greedy, divide et impera)

algorithm/Paradigms.h

beyond.paradigms

Knuth’s strong failure function, Hibbard’s gaps, sentinels, minimum and maximum together

string/StringMatching.h, sort/, search/Minimum.h

beyond.kmp-strong, beyond.slide-sorts

greedy and backtracking knapsack, eight puzzle by breadth and depth

intractable/BranchAndBound.h, intractable/FifteenPuzzle.h

beyond.knapsack-heuristics, beyond.eight-puzzle