?? tree_old_brother.c
字號(hào):
/* 樹(shù)的長(zhǎng)子-兄弟表示法*/
#include<stdio.h>
typedef int DataType ;
struct CSNode; /* 樹(shù)中結(jié)點(diǎn)結(jié)構(gòu) */
typedef struct CSNode *PCSNode; /* 結(jié)點(diǎn)的指針類型 */
struct CSNode { /* 結(jié)點(diǎn)結(jié)構(gòu)定義 */
DataType info; /* 結(jié)點(diǎn)中的元素 */
PCSNode lchild; /* 結(jié)點(diǎn)的最左子女的指針 */
PCSNode rsibling; /* 結(jié)點(diǎn)的右兄弟的指針 */
};
typedef struct CSNode *CSTree; /* 樹(shù)類型定義 */
typedef CSTree *PCSTree;
PCSNode leftChild_cstree(PCSNode p ) {
return p->lchild;
}
PCSNode rightSibling_cstree(PCSNode p ) {
return p->rsibling;
}
PCSNode root_cstree(PCSTree t ) {
return *t;
}
int isNull_cstree(PCSTree t ) {
return *t==NULL;
}
int main(){
return 0;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -