🧠 Before you code — what pattern fits?
Given the head of a linked list, delete the middle node (the ⌊n/2⌋-th node, 0-indexed) and return the head of the modified list.
[1,3,4,7,1,2,6] → [1,3,4,1,2,6]
[1,2,3,4] → [1,2,4]
[2,1] → [2]
🎬 Video explanation · Deepti Talesra
Your solution runs against 4 unit tests, including edge and large-value cases.
Loading...
Test console · 4 unit tests
Submit your code to run it against all 4 unit tests. Results appear here.
JavaScript, TypeScript & Python run sandboxed in your browser; other languages run on the execution server. Your code is saved locally as you type.