Remove Nth Node From End of List
Remove the nth node from the end of a list and return the new head, in one pass (no counting the length first). A dummy head plus two pointers, n apart, do it: advance fast n steps ahead, then move both until fast hits the end.
removeNthFromEnd(list(1, 2, 3, 4, 5), 2); // 1 -> 2 -> 3 -> 5