Skip to content

Instantly share code, notes, and snippets.

@dhinakarangit
Last active December 17, 2015 00:49
void inorderTraversal(struct node *root)
{
if(root==null)
return null;
struct node *temp=root,temp1;
while(true)
{
while(temp!=null)
{
push(temp);
temp=temp->left;
}
temp1=pop();
if(temp1==null)
break;
printf("%d ",temp1->data);
if(temp1->right!=null)
temp=temp1->right;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment