taskrambler
0.1.8
Web server and task management solution.
|
#include <stdio.h>
#include <stdlib.h>
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().
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().
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().
int main | ( | int | argc, |
char * | argv[] | ||
) |
=======================================================================
Definition at line 247 of file binarytree.c.
References deleteElement(), insertElement(), printElement(), and traverse().
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().
void printElement | ( | int | data, |
int | depth | ||
) |
Definition at line 234 of file binarytree.c.
Referenced by main().
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().