Go to the documentation of this file.
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.
t_queue * rbt_keys(const t_rbt *rbt)
Returns a queue with all the keys in the tree, sorted in the ascending order.
struct s_rbt_node * right
The right child.
Doubly-linked list of generic items.
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 * key_type
The type of keys in the tree.
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.