A double linked list, if P points to ai node, then nodes location S P?
CodePudding user response:
Need to work a pointer P1 refers to the precursor node P, S - & gt; Next=P; P1 - & gt; Next=S; P - & gt; The prior=S; S - & gt; The prior=p;
CodePudding user response:
What do you mean p ai's next? Then between p and ai, to join s right? See below if it is,
S - & gt; Next=p - & gt; next;
p-> Next=s;
S - & gt; next-> Prev=s;
S - & gt; Prev=p;
CodePudding user response: