back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/README.md b/README.md
index 8de893d..f8c0170 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ is required for the final build of the executable file.
Before using the functions, allocate dynamic memory in your program.
```
-rb_tree \*new_tree = malloc(sizeof(rb_tree));
+rb_tree *new_tree = malloc(sizeof(rb_tree));
```
Do not forget to free the allocated memory at the end using:
@@ -55,27 +55,27 @@ free(new_tree);
## Interface for managing rb-tree
-1. *`void rb_tree_init(rb_tree \*t);`*
+- *`void rb_tree_init(rb_tree *t);`*
-To fill `new_tree` with initial values.
+ To fill `new_tree` with initial values.
-2. *`node \*rb_tree_create_node(rb_tree \*t, int num);`*
+- *`node *rb_tree_create_node(rb_tree *t, int num);`*
-Returns a pointer of type `node\*` to the created node (note that the node has
-not yet been inserted into the tree). Or NULL if the num value has already been
-inserted into the tree.
+ Returns a pointer of type `node*` to the created node (note that the node has
+ not yet been inserted into the tree). Or NULL if the num value has already been
+ inserted into the tree.
-3. *`void rb_tree_insert_node(rb_tree \*t, node \*cur_node);`*
+- *`void rb_tree_insert_node(rb_tree *t, node *cur_node);`*
-4. *`void rb_tree_delete_node(rb_tree \*t, node \*cur_node);`*
+- *`void rb_tree_delete_node(rb_tree *t, node *cur_node);`*
-5. *`void rb_tree_clear(rb_tree \*t, node \*root);`*
+- *`void rb_tree_clear(rb_tree *t, node *root);`*
-6. *`node\* rb_tree_search(rb_tree \*t, node \*root, int num);`*
+- *`node *rb_tree_search(rb_tree *t, node *root, int num);`*
-Returns a node of type `node\*`. If the value was not found into the tree, then the
-node will be equal to `t->nil`, otherwise it returns the node with the required value.
+ Returns a node of type `node*`. If the value was not found into the tree, then the
+ node will be equal to `t->nil`, otherwise it returns the node with the required value.
-7. `void rb_tree_print(rb_tree \*t, node \*root);`
+- *`void rb_tree_print(rb_tree *t, node *root);`*
-Displaying a binary tree in stdout.
+ Displaying a binary tree in stdout.