End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
slow and fast to the head of the linked list.fast is null or fast.next is null:
a. Move slow one step forward (slow = slow.next).
b. Move fast two steps forward (fast = fast.next.next).slow will be at the middle node. Return slow.