Binary tree traversing
Answer / qint
void Traverse(Node *t)
{
if(NULL == t)
return;
//in-order traversing
Traverse(t->left);
printf("%d",t->data);
Traverse(t->right);
//pre-order
printf("%d",t->data);
Traverse(t->left);
Traverse(t->right);
//post order
Traverse(t->left);
Traverse(t->right);
printf("%d",t->data);
}
| Is This Answer Correct ? | 13 Yes | 0 No |
What is the process of writing the null pointer?
What is the difference between variable declaration and variable definition in c?
How can you find the exact size of a data type in c?
Explain the binary height balanced tree?
Find if a number is power of two or not?
What are types of structure?
What are dangling pointers? How are dangling pointers different from memory leaks?
can we declare a function in side the structure?
What is difference between union All statement and Union?
What is strcmp in c?
What is merge sort in c?
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }