示例#1
0
void inorder_traversal(TLDNode *inorder[], long *curIndex, long size, TLDNode *node)
{
    if (hasLeft(node))
    {
        inorder_traversal(inorder, curIndex, size, node->left);
    }
    inorder[*curIndex] = node;
    (*curIndex)++;
    if (hasRight(node))
    {
        inorder_traversal(inorder, curIndex, size, node->right);
    }
}
示例#2
0
 void left()
 {
     assert( hasLeft() );
     node_ = node_->getLeft();
 }
示例#3
0
 const Node* getLeft() const {
     assert( hasLeft() );
     return this + 1;
 }
示例#4
0
文件: tas.c 项目: lplit/LI213_Projet
int isLeaf(Tas * t, int i)
{
  return !hasLeft(t, i);
}