📄 bitreeexample.h
字号:
void MakeCharTree(BiTreeNode<char>* &root, int num)
{
BiTreeNode<char> *a, *b, *c, *d, *e, *f, *g, *h, *i;
BiTreeNode<char> *j, *k, *l, *m, *n, *o, *null = NULL;
if(num == 1)
{
g = GetTreeNode('G');
d = GetTreeNode('D', g);
b = GetTreeNode('B', d);
e = GetTreeNode('E');
f = GetTreeNode('F');
c = GetTreeNode('C', e, f);
root = GetTreeNode('A', b, c);
}
else if(num == 2)
{
g = GetTreeNode('G');
d = GetTreeNode('D', null, g);
b = GetTreeNode('B', d);
e = GetTreeNode('E');
f = GetTreeNode('F');
c = GetTreeNode('C', e, f);
root = GetTreeNode('A', b, c);
}
else if(num == 3)
{
h = GetTreeNode('H');
i = GetTreeNode('I');
d = GetTreeNode('D', h, i);
j = GetTreeNode('J');
k = GetTreeNode('K');
e = GetTreeNode('E', j, k);
b = GetTreeNode('B', d, e);
l = GetTreeNode('L');
m = GetTreeNode('M');
f = GetTreeNode('F', l, m);
n = GetTreeNode('N');
o = GetTreeNode('O');
g = GetTreeNode('G', n, o);
c = GetTreeNode('C', f, g);
root = GetTreeNode('A', b, c);
}
}
void Printchar(char item)
{
cout << item<<" ";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -