Delete the Middle Node of a Linked List
CodeChefOpen on judge ↗
You are given the head of a singly linked list.\ Your task is to **delete the middle node** and return the head of the modified linked list. The middle node of a linked list of size $N$ is the node at index $⌊N / 2⌋$ (0-based indexing), where ⌊x⌋ is the floor of $x$. If the list contains only **one node**, delete it and return an **empty list** ($NULL$). ## Function Declaration ### Function N
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start