mirror of
https://github.com/ViolentAyang/DataStructureC.git
synced 2026-02-02 18:10:59 +08:00
Create 二叉树的顺序存储.c
This commit is contained in:
22
树/二叉树的顺序存储.c
Normal file
22
树/二叉树的顺序存储.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<stdbool.h>
|
||||
#define MaxSize 100
|
||||
|
||||
typedef struct TreeNode{
|
||||
int value;
|
||||
bool isEmpty;
|
||||
}TreeNode;
|
||||
|
||||
TreeNode* InitTree(){
|
||||
TreeNode t[MaxSize];
|
||||
for(int i=0;i<MaxSize;i++){
|
||||
t[i].isEmpty = true;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
int main(){
|
||||
TreeNode *t = InitTree();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user