Professional Documents
Culture Documents
#include <stdio.h>
#include <stdlib.h>
struct Node
int info;
// in Inorder Traversal
bool lthread;
// in Inorder Traversal
bool rthread;
};
if (ikey == (ptr->info))
return root;
else
break;
else
if (ptr->rthread == false)
break;
if (par == NULL)
root = tmp;
else
Manik Tirkey 20070122181 CSC2
{
return root;
return ptr->right;
return ptr;
if (root == NULL)
printf("Tree is empty");
ptr = inorderSuccessor(ptr);
// Driver Program
int main()
inorder(root);
return 0;