This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/DataStructure/Code/ex10/bintree.h
2021-12-19 22:25:07 +08:00

9 lines
No EOL
230 B
C

//bintree宏定义
#include "binnode.hpp"
#define isRoot(x) (!(x->parent))
#define isLC(x) (!isRoot(x)&&((x)==(x->parent->lc))
#define isRC(x) (!isRoot(x)&&((x)==(x->parent->rc))
#define hasLC(x) (x->lc)
#define hasRC(x) (x->rc)