Go to the source code of this file.
◆ bt_node
A binary tree node, which also represents the base node of the BST itself.
◆ bt_node_value
◆ u64_bst_cleanup()
Performs cleanup operations on the given node and its branches. Recursive.
- Parameters
-
node | A pointer to the node to cleanup. |
◆ u64_bst_delete()
Attempts to delete a node with the given key from the tree. This should be cleaned up by the caller.
- Parameters
-
root | A pointer to the node to begin the search from. |
key | The key to be deleted. |
- Returns
- A pointer to the deleted key, if found; otherwise 0.
◆ u64_bst_find()
Attempts to find a node with the given key.
- Parameters
-
root | A constant pointer to the root node to search from. |
key | The key to search for. |
- Returns
- A constant pointer to the node, if found; otherwise 0/null.
◆ u64_bst_insert()
Inserts a node into the given tree (represented by the root node).
- Parameters
-
root | A pointer to the root node. |
key | The key to be inserted. |
value | The value to be inserted. NOTE: The BST does NOT take its own copy of this data. |
- Returns
- A pointer to the inserted node. This should be saved off if creating the root node.