A binary search tree stores smaller keys to the left and larger keys to the right. This is the page’s default insertion order. The target is forty two. The root is fifty. Coordinates use the original recursive midpoint rule; levels are separated by sixty five pixels. The animated pointer is a teaching overlay, not a changing tree or an extra algorithm state. Compare forty two with fifty. Forty two is smaller, so follow the left edge to thirty. Forty two is larger than thirty, so follow the right edge to forty. Forty two is larger than forty, so take its right edge to forty two. Equality finishes the search. The pointer travels only these actual source edges. All stored keys and other branches remain fixed. The exact trace is fifty, thirty, forty, forty two: four key comparisons. Forty two is at depth three, with the root at depth zero. Eleven keys exist, but the search visits four. This is this example’s comparison count, not a timing benchmark or a promise that every binary search tree stays balanced. Insert ten, twenty, thirty, forty, forty two, fifty in increasing order. Every new key goes right. The left diagram is this six level chain. The right diagram shows the page’s rebalance result using exactly the same six keys. It sorts them in order, chooses the floor midpoint, and rebuilds the whole tree. This is not an incremental AVL rotation. Search for forty two in both trees. The chain visits ten, twenty, thirty, forty and forty two. After median rebuilding, the root is thirty. Forty two is larger than thirty, so follow right to forty two and stop. The two pointers illustrate only actual comparison paths. Their movement duration is explanatory pacing, not measured algorithm speed. The chain requires five key comparisons for forty two. The rebuilt tree requires two. The sorted key set is unchanged. Height decreases from six levels to three levels. The source chooses index two of six for the root, so the root is thirty rather than forty. Actual search costs depend on the resulting shape and the requested key. The missing-key preset inserts fifty, twenty five, seventy five, twelve, thirty seven, sixty two, eighty seven. Search for ninety nine. The root is fifty. Greater-than comparisons lead right, but a missing child terminates the loop. A null child is not a stored key. Ninety nine is greater than fifty, so go right to seventy five. It is greater than seventy five, so go right to eighty seven. It is greater than eighty seven, but eighty seven has no right child. The highlighted route contains exactly two stored edges. There is no invented edge to a hidden ninety nine node. The three key comparisons visit fifty, seventy five, eighty seven. The page adds a fourth trace row marked null to report failure. That fourth row is not a fourth comparison against a key. This distinction matters when reading the counter. The page’s separate linear-lookups bar is a heuristic, not an actual measured linear search, and it is not used here.