BST to sorted linked list (flatten a tree)

Why is using inorder traversal the wrong approach?
We can store address of the nodes in a vector and the we can one by one connect each node to next node in the vector. At the end we can connect to NULL.

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.