here is the code…–>>
What's wrong in it , it didn't pass any test case
@rajsaxena.personal use cout<<endl after every output as you have to print in new line for every testcase.
still it didn’t pass any test case??
@rajsaxena.personal you have to do cout endl after each test case not after each no . do cout endl just below print(root)
here corrected one
i hope your doubt is cleared if yes dont forget to mark it as resolved @rajsaxena.personal 