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/ex09/bintree.h

9 lines
230 B
C
Raw Normal View History

2021-12-03 07:26:29 +00:00
//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)