link-https://ide.codingblocks.com/s/211252
why code is giving TLE after submitting
Print bst in given range
Hello @dakshi,
-
They are two mistakes that will cause wrong output.
I have corrected them:
https://ide.codingblocks.com/s/211308 -
Your code is causing segmentation error due to the following statement for t>1:
static int i=0;
For next iteration, the value of i won’t be 0 again.
Correct it.
Hope, this would help.
Give a like if you are satisfied.
Hello @dakshi,
As you have not responded for long.
So, i can correct your code for you. If you want.