Emerson Interview Question

Given the head of a linked list, return the middle node.

Interview Answer

Anonymous

Dec 9, 2025

LinkedList *fast = head; LinkedList *slow = head; while(fast && fast->next){ slow = slow->next; fast = fast->next->next; }