- Computer Science Engineering (CSE)
- Data Structures (DS)
- Non Linear Data Structures - Trees
- What is the time complexity of level ord...

Q. |
## What is the time complexity of level order traversal? |

A. | O(1) |

B. | O(n) |

C. | O(logn) |

D. | O(nlogn) |

Answer» B. O(n) |

View all MCQs in:
Data Structures (DS)

- Consider the following data. The pre order traversal of a binary tree is A, B, E, C, D. The in order traversal of the same binary tree is B, E, A, D, C. The level order sequence for the binary tree is
- The post-order traversal of a binary tree is O P Q R S T. Then possible pre-order traversal will be
- What is the time complexity of pre-order traversal in the iterative fashion?
- Graph traversal is different from a tree traversal, because
- What is the space complexity of the post-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)
- What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)
- The pre-order and in-order are traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of following is post-order traversal of the tree?
- For the tree below, write the level-order traversal.
- Which of the following graph traversals closely imitates level order traversal of a binary tree?
- For the tree below, write the pre-order traversal.

Login to Continue

It will take less than 2 minutes

Report MCQ