Mental Model
To remove the nth node from the end, we find the node just before it by moving two pointers with a gap of n nodes.
Analogy: Imagine two friends walking on a path where one starts n steps ahead. When the front friend reaches the end, the other is right before the target to remove.
head -> 1 -> 2 -> 3 -> 4 -> 5 -> null
↑ ↑
slow fast