How to use this handbook
Read each formula with its assumptions; a complexity bound belongs to an implementation, not just a data-structure name.
Formula boxes collect results; watch boxes flag traps; why boxes give short checks; examples use independent data.
Untagged sections serve CS and DA. Read your branch's tagged sections as well; CS reads Chapters 1–10; DA reads Chapters 1–4, 6 and 11, including Python-specific depth in Chapter 11.
Indices start at zero unless stated. Tree height and depth count edges; an empty binary subtree has height .
Counts are dimensionless. Addresses and object sizes use bytes; a C byte has CHAR_BIT bits and need not be eight bits.
Logarithms in complexity mean . Arithmetic examples assume representable results; any width or character encoding needed is stated.
C examples use C11 rules unless an old question explicitly specifies another convention. Chapter 11 uses Python 3 semantics; Chapter 6 supplies shared recursion-tracing methods.
Graph connectivity, matching and colouring (CS §1), and introductory graph theory (DA §4): see the Engineering Mathematics handbook. General searching, sorting, recurrence-solving and graph algorithms: see the Algorithms handbook.