I have problem solving doubly linked list in c++, i have pseudo code for function who finds element, so can someone help me?
struct element {
int key;
element *prev, *next;
};
function FIND(head, key)
begin
current:=head;
while current<>NIL and current.key <> key do
current:=current.next;
end
return current;
end