mirror of
https://github.com/CodePanda66/CSPostgraduate-408.git
synced 2023-05-21 21:49:33 +08:00
🌱 add Tree
This commit is contained in:
37
DataStructure/DS_4_TreeAndBinaryTree/DS_4_4_TreeSq.cpp
Normal file
37
DataStructure/DS_4_TreeAndBinaryTree/DS_4_4_TreeSq.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// Created by Kim Yang on 2020/8/26.
|
||||
// Copyright (c) Kim Yang All rights reserved.
|
||||
//
|
||||
#include <stdio.h>
|
||||
//树——双亲表示法(顺序存储)
|
||||
/**定义模块**/
|
||||
#define MAX_TREE_SIZE 100
|
||||
|
||||
typedef struct {
|
||||
int data; //数据元素
|
||||
int parent;//双亲位置域
|
||||
}PTNode;
|
||||
typedef struct {
|
||||
PTNode nodes[MAX_TREE_SIZE];//双亲表示
|
||||
int n;//结点数
|
||||
}PTree;
|
||||
/**定义模块**/
|
||||
|
||||
|
||||
/**实现模块**/
|
||||
//坐等填坑
|
||||
|
||||
/**实现模块**/
|
||||
|
||||
|
||||
/**测试模块**/
|
||||
|
||||
void testModule() {
|
||||
|
||||
}
|
||||
|
||||
/**测试模块**/
|
||||
int main() {
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user