data_structures
rbt_size.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* rbt_size.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2020/07/18 00:23:59 by unite #+# #+# */
10 /* Updated: 2020/07/19 00:31:18 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "rbt.h"
15 #include "rbt_utils.h"
16 
17 size_t rbt_size(const t_rbt *rbt)
18 {
19  return (rbt_size_subtree(rbt->root));
20 }
s_rbt
A left-leaning red-black binary search tree.
Definition: rbt.h:72
rbt_size
size_t rbt_size(const t_rbt *rbt)
Returns the number of elements in this tree.
Definition: rbt_size.c:17
rbt.h
rbt_utils.h
s_rbt::root
t_rbt_node * root
The root of the tree.
Definition: rbt.h:74