https://ide.codingblocks.com/s/256524 this code is unable to pass the test cases.
Test Cases Not passing
hello @Siddharth6780
try to submit this -> https://ide.codingblocks.com/s/256527
ur code was correct,
i have added some space in preorder function to match the output format.