Getting Segmentation Fault
hi @mohammadabdullahjawwad, at line 42 , it should be
prev->right = root;
instead of
root->right=root
I made the said changes. Nothing is being printed now
@mohammadabdullahjawwad, there is a small error
in your solution class make intitialize prev and head with NULL
node* prev=NULL;
node* head=NULL;
refer this :- https://ide.codingblocks.com/s/240468
It helped! Does this assign some garbage value if I don’t initialise. Or is there something else going on
it is assigning garbage values
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.