diff options
| author | Soikk | 2022-08-08 21:56:27 +0200 |
|---|---|---|
| committer | Soikk | 2022-08-08 21:56:27 +0200 |
| commit | ae0921866fb49aadea65b8057ab000d42e75f24c (patch) | |
| tree | b0bd66fa790667a087dece98c5c40b6cc673e62c /DOC | |
| parent | 65aada1a6d5f01e8d167fb816c467d60a28d2d97 (diff) | |
| download | soikk-DB-ae0921866fb49aadea65b8057ab000d42e75f24c.tar.xz soikk-DB-ae0921866fb49aadea65b8057ab000d42e75f24c.tar.zst | |
Minor changes.
Diffstat (limited to 'DOC')
| -rw-r--r-- | DOC | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -151,6 +151,15 @@ STORAGE https://www.geeksforgeeks.org/avl-tree-set-1-insertion/ https://www.geeksforgeeks.org/avl-tree-set-2-deletion/ + static inline uint64_t max(uint64_t a, uint64_t b); + Returns the maximum of a and b. + + static uint64_t height(node *n); + Returns the height of node n. + + static int64_t balance(node *n); + Returns the balance of node n. + node *insertNode(node *r, uint64_t h, uint64_t i); Inserts a new node with hash h and index i into node r, self balancing the node structure after having done so. Returns a pointer to the resulting node in that position. |
