Https://ide.codingblocks.com/s/655589

can you please help me out in printing level order traversal and also the function f in the code is giving segmentation fault

hi @hittasehgal,
do you need level order traversal for this question?
btw your level order traversal code is correct

@hittasehgal and to overcome segmentation fault you need to check if root is null initially in that function if yes return
like --> if(root == NULL)return;

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.