This commit is contained in:
krahets
2023-08-04 05:25:22 +08:00
parent 71074d88f6
commit 08e4924054
4 changed files with 7 additions and 5 deletions

View File

@@ -6,12 +6,14 @@
#include "../utils/common.h"
/* 数组表示下的二叉树类 */
struct arrayBinaryTree {
vector *tree;
};
typedef struct arrayBinaryTree arrayBinaryTree;
/* 构造函数 */
arrayBinaryTree *newArrayBinaryTree(vector *arr) {
arrayBinaryTree *newABT = malloc(sizeof(arrayBinaryTree));
newABT->tree = arr;