Name

bitree_rem_left

Synopsis

void bitree_rem_left(BiTree *tree, BiTreeNode *node);

Return Value

None.

Description

Removes the subtree rooted at the left child of node from the binary tree specified by tree. If node is NULL, all nodes in the tree are removed. The function passed as destroy to bitree_init is called once for each node as it is removed, provided destroy was not set to NULL.

Complexity

O (n), where n is the number of nodes in the subtree.

Get Mastering Algorithms with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.