For level order printing we have to travel all levels and for each level (or node) recursive function is called twice. Hence it should be O(2^N).
Why time complexity for level order printing O(n*n)?
Level order printing of tree
- using recursion takes time O(2^n)
- using queue takes time O(n)
where n is no of nodes in tree
But in video sir said it’s O(n^2)