|
taskrambler
0.1.8
Web server and task management solution.
|
#include <stdio.h>#include <stdlib.h>
Include dependency graph for binarytree.c:Go to the source code of this file.
Data Structures | |
| struct | element |
Functions | |
| struct element * | newElement (int data) |
| struct element * | findElement (struct element *tree, int data) |
| void | insertElement (struct element **tree, int data) |
| struct element * | findInOrderSuccessor (struct element *tree) |
| void | deleteElement (struct element **tree, int data) |
| void | traverse (struct element *tree, void(*cb)(int, int)) |
| void | printElement (int data, int depth) |
| int | main (int argc, char *argv[]) |
| struct element |
| void deleteElement | ( | struct element ** | tree, |
| int | data | ||
| ) |
Definition at line 105 of file binarytree.c.
References element::data, findInOrderSuccessor(), element::left, element::parent, and element::right.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:find element in tree
Definition at line 30 of file binarytree.c.
References element::data, element::left, and element::right.
delete element from tree
find minimum of the right subtree aka leftmost leaf of right subtree aka left in-order successor. We return the parent of the element in the out argument parent. This can be NULL wenn calling.
Definition at line 93 of file binarytree.c.
References element::left, and element::right.
Referenced by deleteElement().
Here is the caller graph for this function:| void insertElement | ( | struct element ** | tree, |
| int | data | ||
| ) |
insert element in tree
Definition at line 51 of file binarytree.c.
References element::data, element::left, newElement(), element::parent, and element::right.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
=======================================================================
Definition at line 247 of file binarytree.c.
References deleteElement(), insertElement(), printElement(), and traverse().
Here is the call graph for this function:| struct element* newElement | ( | int | data | ) |
Definition at line 15 of file binarytree.c.
References element::data, element::left, element::parent, and element::right.
Referenced by insertElement().
Here is the caller graph for this function:| void printElement | ( | int | data, |
| int | depth | ||
| ) |
Definition at line 234 of file binarytree.c.
Referenced by main().
Here is the caller graph for this function:| void traverse | ( | struct element * | tree, |
| void(*)(int, int) | cb | ||
| ) |
Definition at line 185 of file binarytree.c.
References cb, element::data, element::left, element::parent, and element::right.
Referenced by main().
Here is the caller graph for this function: