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
How do you determine whether to use a stream function or a low-level function?
What is variable declaration and definition in c?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What are the application of c?
Difference between MAC vs. IP Addressing
How arrays can be passed to a user defined function
What are the two forms of #include directive?
What should malloc(0) do?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Can a variable be both const and volatile?
What is const and volatile in c?
What is difference between main and void main?
When we use void main and int main?
How many bytes are occupied by near, far and huge pointers (dos)?
What is merge sort in c?