my code: https://ide.codingblocks.com/s/251863
What is wrong in this?
@princeky4 you are taking 2 inputs each time (in insert function) but as you can see in the given test case, you will get only 1 value. You dont need to make a complicated build function because it is mentioned that the max number of children is 3, so you can treat it as a regular binary tree.
I am getting the same answer . Can you correct it?
@princeky4 try changing your approach for level order sum. Use a recursive approach, I have written a code here https://ide.codingblocks.com/s/251978 you can see the approach. Let me know if you still have any confusion.