blob: a045dd4950b0122e8b40cf757802c97dcbd3df97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#define ORDER 4
#define PTRS 5
/*
* ptrs: will point to data when the node is a leaf
* will contain the next nodes when just a node
* accessed as an array MAX = PTRS
* sib: will only be valid when the node is a leaf
*/
struct b_node {
int key_count;
bool is_leaf;
int *keys;
void **ptrs;
struct b_leaf *leaf;
struct b_node *sib;
};
struct b_leaf {
int data;
struct b_leaf *sib;
};
|