Delete the Middle Node of a Linked List

Medium · Linked Lists · about 10 minutes

Asked at Google, Microsoft, Amazon, Meta.

Remove the middle node of the list and return its head. With n nodes, the middle is the one at 0-based position ⌊n / 2⌋; a one-node list therefore becomes empty.

Related guides