-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuucp_tree.c
More file actions
42 lines (36 loc) · 940 Bytes
/
uucp_tree.c
File metadata and controls
42 lines (36 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*====================================================================
* Description: Implement the tree, binary tree... strange to me
* Also kind of linked list? with left and right two
* arms?
* DATE: 2013/11/1
* Modify:
* Conclusion:
===================================================================*/
/* include */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/* Macro definition */
#define true 1
#define false 0
typedef struct _tree{
void *data;
struct _tree *left;
struct _tree *right;
}Tree;
/* insert node to the tree, if the data is larger than the parent's
* insert to the right leaf, if the data is smaller than the
* parent's, insert to the left leaf, if is euqal to the parent's
* insert to the left leaf also. */
void
insert(Tree **root, void *data)
{
}
void displayTree(Tree *t)
{
}
int
main(int argc, char **argv)
{
return 0;
}