How would you print out the data in a binary tree, level by
level, starting at the top?
Answer Posted / janraj cj
Use Breadth First search algorithm. This is using queue
as the data structure .
| Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
What is wrong in this statement? scanf(ā%dā,whatnumber);
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
When was c language developed?
Explain what is the use of a semicolon (;) at the end of every program statement?
Why header file is used in c?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What is the difference between int main and void main?
What are the benefits of organizational structure?
Explain 'bus error'?
Is main is user defined function?
What is mean by data types in c?
What is a program flowchart and explain how does it help in writing a program?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
What is ponter?