⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tree_old_brother.c

📁 《算法和数据结构——C语言描述》
💻 C
字号:
/* 树的长子-兄弟表示法*/

#include<stdio.h>

typedef int DataType ;
struct  CSNode;   					/* 树中结点结构 */
typedef  struct  CSNode   *PCSNode;	/* 结点的指针类型 */
struct  CSNode {   					/* 结点结构定义 */
    DataType info;					/* 结点中的元素 */
    PCSNode  lchild;				/* 结点的最左子女的指针 */
    PCSNode  rsibling;				/* 结点的右兄弟的指针 */
};

typedef  struct CSNode  *CSTree;	/* 树类型定义 */
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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -