Question DSA-LL-0039
EasyTo insert newNode after node p in a singly linked list, which order of steps is correct?
- A.
p = newNode, then newNode.next = p
- B.
p.next = newNode, then newNode.next = p.next
- C.
Sign up free to see the answer and a step-by-step explanation.