This is the Approach I wrote It worked fine when using vscode on my local machine . But says core dumped when i run online also the OP format is not disclosed because of this kindly help me with the same
Doubt in Printing Keys In Given Range
in the constructor
you have not initialize left and right pointers
left = NULL;
right=NULL;
now it will not give runtime error
What would be the output format as even on 4 3 2 5 6 3 4 5
sample output should be like this
Sample Output
# Preorder : 4 3 2 5 6
# Nodes within range are : 3 4 5
you have to write
# Preorder : <preorder traversal of your tree>
# Nodes within range are : <your ans >
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.