#include "bitree.h"
#include <stdio.h>
#include <stdlib.h>
bool path(BiTNode* root, BiTNode* node, Stack* s)
{
BiTNode* T=root;BiTNode* p=NULL;
if(root==NULL||!is_empty(s)||node==NULL)return false;
while(T||is_empty(s)){
while(T!=NULL){push(s,T);
if(node==T)return true;
T=T->left;}
top(s,&T);
if(!T->right||t->right==NULL){
pop(s,&T);
p=T;
T=NULL;
}else {T=T->right;}
}return false;
}