Linked List
19. Remove Nth Node From End of List
"nth from the end" is "(length − n + 1)th from the start" — but you don't have to measure the length first. Put two pointers n nodes apart, then walk them together: when the front one runs off the…
Loading…