is my approach correct … and y am i failing only one test case
Level order (zig zag ) traversal
Your code is not working for following test case as,
Input : 10 true 20 true 40 false false true 50 false false true 30 true 60 false false true 73 false true 88 false false
Expected Output : 10 30 20 40 50 60 73 88
Your output : run error
Try to change your approach a little bit…