I posted this long b4 but dint see this error : Delivery to the following
recipient failed permanently:     algogeeks@googlegroups.com
re-posting:
BST_Spiral(struct node* root)
{
  ht = Height(root);

  for( i = 0; i<= ht; i++)
  {
    PrintSpiral(root, i, i%2  /*flip 1 and 0 alternately on each
iteration*/);
  }

void PrintSpiral(struct node* root, int level, bool bRTL/* Right-To-Left */)
{
  if ( root == NULL) return;

 if( level == 0 )
 {
   printf("%d", root->data)
   return;
 }

 if( bRTL )
 {
   PrintSpiral(root->right,level-
1,bRTL)
   PrintSpiral(root->left,level-1,bRTL)
 }
 else
 {
   PrintSpiral(root->left,level-1,bRTL)
   PrintSpiral(root->right,level-1,bRTL)
 }
}


On Tue, Nov 24, 2009 at 11:12 AM, Rohit Saraf
<rohit.kumar.sa...@gmail.com>wrote:

> And it cannot be made more efficient.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.


Reply via email to