Name

bitree_ins_right

Synopsis

int bitree_ins_right(BiTree *tree, BiTreeNode *node, const void *data);

Return Value

0 if inserting the node is successful, or -1 otherwise.

Description

This operation is similar to bitree_ins_left, except that it inserts a node as the right child of node in the binary tree specified by tree.

Complexity

O (1)

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.