BST To sorted Linked List

when we are considering the case of right node not being null we are using:

root->right=RightLL.head;

instead if we write
RightLL.head->left=root;

is it wrong and will it change the functionality in any manner?

@aryamaan1011 hey yes it will change functionality as first right recursion will called and ll is made so recursion works in depth wise manner so it will effect the functionality,you can take a short example and dry run it ,you will get it for both cases.

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.