4 ms·
The man page on macOS High Sierra 10.13.6 states: "The tdelete() function deletes a node from the specified binary search tree and returns a pointer to th
by pschastain 6y ago
The man page on macOS High Sierra 10.13.6 states:
"The tdelete() function deletes a node from the specified binary search tree and returns a pointer
to the parent of the node that was deleted. It takes the same arguments as tfind() and
tsearch(). If the node to be deleted is the root of the binary search tree, rootp will be
adjusted."
It seems reasonable to infer that if a tree has only 1 node that node is the root node.
If I'm wrong I'd appreciate an explanation; I'm only a hobbyist programmer and my understanding of these things is limited.