-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinaryTree.h
More file actions
32 lines (25 loc) · 798 Bytes
/
binaryTree.h
File metadata and controls
32 lines (25 loc) · 798 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
#ifndef BINARYTREE_H
#define BINARYTREE_H
#include "constants.h"
#include <stdio.h>
typedef enum
{
LEFT, RIGHT
} treeDirection;
struct treeNode
{
struct treeNode *left;
struct treeNode *right;
char data[SIZE];
};
void initTree(struct treeNode *root);
void addChildTreeNode(struct treeNode *root, char *data, treeDirection td);
void initTreeChild(struct treeNode *root, treeDirection td);
void initTreeChildren(struct treeNode *root);
struct treeNode *treeCopy(struct treeNode *orignal);
void visitTree(struct treeNode *treeRoot, int depth);
void deleteTree(struct treeNode *treeRoot);
void recursivePrint(struct treeNode* node, FILE* f, int i);
void generateDOT(struct treeNode* tree, FILE* stream);
void stepByStepGraph(struct treeNode* tree);
#endif /* BINARYTREE_H */