sir why these code not working
Bst flatten a tree
sir please reply i wanted to know my mistake in these code
@YASHMATHURIA123, the problem in your code is that you are returning pointer to a garbage value as there is no linkedlist value stored so you have to allocate dynammically a linkedlist explicitly ,So, either pass linkedlist by value or allocated memory address to the pointer you are returning refer code for more clarification.
I have corrected your code :
refer this :-
pass by address :- https://ide.codingblocks.com/s/259028
pass by value :- https://ide.codingblocks.com/s/259020
In case of any doubt feel free to ask
Mark your doubt as RESOLVED if you got the answer