In v0.9.1, p.99, the “post-swap” diagram has minor mistake: remove dotted line & add solid line between node 27 and 37.
I guess the text on p.98 also is not clear (or is inferred) that once node 27 is swapped into place of deleted node 25, the left and right children (12 and 37) still need to be re-connected to 27 (which originally had no children).
Oh, wait, I see; upon further reading of the code on p.100, I realize now that the swap does not really refer to the node, but rather the node.value.
I think this sentence on p. 98 led me astray:
When removing a node with two children, replace the node you removed with smallest
node in its right subtree.
I would suggest clarifying that to be specific about the node.value; i.e.
When removing a node with two children, replace the value of that node [to be removed] with the
value of the smallest node in its right subtree.
The diagram on p. 98 does mention “Replaced value” but then that diagram also has the relationship lines marked incorrectly.
Hope I’m not being obtuse!