Concept Flow - Find Middle Element of Linked List
Start: head points to first node
Initialize two pointers: slow and fast at head
Loop: fast and fast.next not null?
NoāStop
Yes
Move slow by one node
Move fast by two nodes
Repeat loop
When loop ends, slow points to middle node
Return slow.data as middle element
Use two pointers moving at different speeds to find the middle node in one pass.
