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 type of function is main ()?
main() { float a=3.2e40; printf("%d",a); }
How can I get the current date or time of day in a c program?
logic for x=y^n
how would a 4*3 array A[4][3] stored in Row Major Order?
What tq means in chat?
What is meant by recursion?
What is the difference b/w Structure & Union?
how to generate the length of a string without using len funtion?
write a C program to print the program itself ?!
Explain the difference between structs and unions in c?
Who is the main contributor in designing the c language after dennis ritchie?