Go to the documentation of this file.
16 static void rbt_inorder_recur(
const t_rbt *rbt,
21 rbt_inorder_recur(rbt, node->
left, queue);
23 rbt_inorder_recur(rbt, node->
right, queue);
31 rbt_inorder_recur(rbt, rbt->
root, queue);
A left-leaning red-black binary search tree.
struct s_rbt_node * right
The right child.
Doubly-linked list of generic items.
t_queue * rbt_vals(const t_rbt *rbt)
Returns a queue with all the value in the tree, sorted by the associated keys in the ascending order.
t_queue * queue_new(const t_type *type)
Allocates memory and initializes an empty queue.
struct s_rbt_node * left
The left child.
const t_type * val_type
The type of values in the ree.
void queue_enqueue(t_queue *queue, const void *data)
Copies the item and adds the copy to the queue.
A node in a red-black tree.
t_rbt_node * root
The root of the tree.