-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
43 lines (35 loc) · 883 Bytes
/
main.c
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
42
43
#include <stdio.h>
#include "struct.h"
int main()
{
// for bin tree
/*
int rc = OK;
bintree_t *root = NULL;
bintree_t *node = NULL;
bintree_create("tree.in", &root);
inorder(root);
node = bintree_search(root, 5);
//if (node) {
// printf("search node successful, node:%p, key:%d\n", node, node->data);
//}
bintree_delete(&root, 5);
bintree_delete(&root, 9);
bintree_delete(&root, 0);
bintree_inorder(root);
//bintree_postorder(root);
printf("\n");
//postorder(root);
*/
// for sort algorithms
int s[16] = {6, 5, 1, 0, 4, 3, 9, 8, 7, 2, 18, 19, 12, 13, 10, 14};
sort_print(s, 16);
//sort_insert(s, 10);
//sort_shell(s, 10);
//sort_quick(s, 0, 9);
//sort_select(s, 10);
//sort_heap2(s, 16);
sort_merge2(s, 0, 15);
sort_print(s, 16);
return 0;
}