Problem 1474 · Easy

Delete N Nodes After M Nodes of a Linked List

Walk a singly linked list, keep m nodes, delete the next n, and repeat until the list ends.

Open the interactive visualisation