From b173aaad565d3463a8e29188b4e0cc28f4b2e1c2 Mon Sep 17 00:00:00 2001 From: ViolentAyang <76544389+ViolentAyang@users.noreply.github.com> Date: Sat, 9 Apr 2022 15:38:01 +0800 Subject: [PATCH] =?UTF-8?q?Create=20=E4=BA=8C=E5=8F=89=E6=A0=91=E7=9A=84?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E5=AD=98=E5=82=A8.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 树/二叉树的顺序存储.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 树/二叉树的顺序存储.c diff --git a/树/二叉树的顺序存储.c b/树/二叉树的顺序存储.c new file mode 100644 index 0000000..feb15ed --- /dev/null +++ b/树/二叉树的顺序存储.c @@ -0,0 +1,22 @@ +#include +#include +#include +#define MaxSize 100 + +typedef struct TreeNode{ + int value; + bool isEmpty; +}TreeNode; + +TreeNode* InitTree(){ + TreeNode t[MaxSize]; + for(int i=0;i