I think that my error is in the build tree from level order function but I can't find it

@akh.chakraborty11
You are right, The issue is with the input function only. You are still taking preorder input with passing i as a parameter without actually using it in any manner.
Refer to this code for the level order input function - https://ide.codingblocks.com/s/108450

1 Like

Thank you for the help.