LC: 1474. Delete N Nodes After M Nodes of a Linked List: - spiralgo/algorithms GitHub Wiki

1474. Delete N Nodes After M Nodes of a Linked List:

The Essence:

The question tries to teach us:

  • How to traverse a Linked List.
  • How to delete a node on Linked List.

Details:

  • The problem-solver should need to learn how to traverse on a Linked List using a while-loop and a pointer first, on an easier example.
  • It is quite easy to delete a node on Linked List, just by modifying the pointer of the predecessor node (of the current node we want to delete).