Print all edge nodes of a complete binary tree anti-clockwise. In other words, print the boundary of the tree.
Click for Solution

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A v


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A first of all we traverse the left node and print theis ..
    leaf node funtion print all leaf node
    right_node function print all right node .......



  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 682
    v excellent ans

    CpjJwWHV   answer kaha hai
    13 years ago

    Smiley


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 682
    R
    void anticlock_edge(struct node *ptr)
    {
    	if(root==NULL)
    	{
    		printf("Tree is empty");
    		return;
    	}
    	if(ptr!=NULL)
    	{
    		anticlock_edge(ptr->rchild);
    		anticlock_edge(ptr->lchild);
    		if(ptr->lchild==NULL
    


    CpjJwWHV   a
    14 years ago

    Smiley


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 682
    S if the hight of the tree is' h'
    then the no. of boundry nodes is=2*h-1

[Insert Code]