Remove the Nth Node From the End
Medium · Linked Lists · about 15 minutes
Asked at Meta, Amazon, Microsoft.
Delete the node that sits n places from the end of the list (n = 1 is the last node; 1 ≤ n ≤ length) and return the list's head. Can you manage it in a single pass?