A Common-Sense Guide to Data Structures and Algorithms, Second Edition: 'delete' doesn't handle removing root node with single child node (pg267)


It seems that the delete method presented in this book doesn’t handle one case. This function does nothing if we try to remove root node with a single child node. It would simply return this only child node and that’s all.