Remove Nth Node From EndMedium

linked list two pointers

Remove the nth node counted from the end of a singly-linked list. A dummy head sidesteps the head-removal edge case. Two approaches — switch between them and watch how counting versus a fixed-gap pointer pair locate the same node.

Press play to remove the nth node from the end.
Metrics
Legend
How it works
0 / 0