Home > Back-end >  New people for help, will have a big data structure around the man X X
New people for help, will have a big data structure around the man X X

Time:03-09

Written in c language a delete value is the first key nodes in the singly linked list: find the value of the key nodes exists, if any, are removed; Otherwise it returns NULL,

CodePudding user response:

Nonsense! The problem of how to run C to Delphi?
Lazy! Such an important practice, must make your own!
Play the fart fart!

CodePudding user response:

reference 1st floor MoMei non-trace response:
nonsense! The problem of how to run C to Delphi?
Lazy! Such an important practice, must make your own!
Play the fart fart!

Agree

The function DeleteNode (var Node: TNode) : TNode;
Var
PreNode nextNode: TNode;
The begin
Result:=nil;
PreNode:=Node;
If preNode. Value='https://bbs.csdn.net/topics/key' then
The begin
Result:=preNode;
Node:=preNode. Next;
The Exit;
end;
NextNode:=Node. The Next;
While nextNode<> Nil do
If nextNode. Value='https://bbs.csdn.net/topics/key' then
The begin
PreNode. Next:=nextNode. Next;
The Dispose (nextNode);
Result:=nextNode;
Break;
End
The else begin
PreNode:=nextNode;
NextNode:=nextNode. Next;
end;
end;
  • Related