Find the middle element of a singly Linked List

data-structure
linked-list

(Team) #1

The problem we are exploring is to find the middle element of a singly linked list. For instance, if the linked list is 1 -> 2 -> 3 -> 4 -> 5, then the middle element is 3. If there are even number of elements in a linked list such as 1 -> 2 -> 3 -> 4 -> 5 -> 6, then the middle element is 3 and 4.


This is a companion discussion topic for the original entry at http://iq.opengenus.org/find-middle-of-a-linked-list/