Remove the Nth Node From the End

L6 Medium Linked List
Concept
A dummy node simplifies deleting the first element, and spacing two pointers exactly n apart finds the correct position from the end in one pass.
Given the head of a singly linked list, remove the node that is the nth from the end (1-based), and return the head of the updated list. You may assume n is always valid.
Examples
▸ head = [1, 2, 3, 4, 5], n = 2
→ [1, 2, 3, 5]
▸ head = [1], n = 1
→ []
▸ head = [1, 2], n = 1
→ [1]
Progressive Hints
Hint 1 · Nudge
Open a gap of n nodes between two pointers, then slide until the front hits the end.
Hint 2 · Plan
Insert a dummy node before the head so removing the head is ordinary. Advance a first pointer n steps. Then move both pointers until the first reaches the end. The second pointer now sits right before the node to delete, so skip over it.
Hint 3 · Approach
dummy = node before head. fast = dummy, advanced n steps. slow = dummy. While fast.next exists: fast = fast.next; slow = slow.next. Set slow.next = slow.next.next. Return dummy.next.
Output
// Run your code to see the output here.