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