Shouldn’t the worst case complexity be :
L*(2^L - 1)
if L = number of levels , because :
To print all levels , we are considering a loop of length L
in case of printing the last level we need to process each of the 2^L-1 nodes ?
please correct me if i am wrong !
Doubt on time complexity
Sorry i quoted the wrong lecture , corrected it now,
binary tree - level order : print recursive .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.