Hi I have a problem. I have to create a 'recursive loop' to search each node in a single linked list for the smallest value and return the node before that node.
I was hoping to solve this problem by using the previous and current nodes.
Now my problem is if the value appears in the middle of the list, then how can I still come back to the prev node of the smallest value after searching the whole list.
Why don't you use additional variable to handle the value, to keep the record basically.