Sail E0 Webinar
Question
What is the time complexity of level order traversal?
Options:
A .  O(1)
B .  O(n)
C .  O(logn)
D .  O(nlogn)
Answer: Option B


Since you have to go through all the nodes, the complexity becomes O(n).



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers