Write an algorithm to interchange two list elements stored in a linked list. InterchangeList(position pos1, position pos2, List *list)
I thought you might say the same thing I did. what exactly is the type "position" defined as?
This is a question posed to me in a C course. I know how to swap nodes of a list. That's not the problem here. If the function was written like "InterchangeList(List* list) I'd have no problem.
Can anyone offer a little explaination as to how the first two parameters relate to what's going on inside the function? I wonder if pos 1 and pos 2 are search keys....
I know my question is a little ambiguous...then again, so is the problem at hand.
Thanks in advance,
Mike