Middle of the Linked List
Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node.
Middle of the Linked List

Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node.

Example 1:
Input: [1,2,3,4,5]
Output: [3,4,5]
Input
arr =[1,2,3,4,5]

Find middle of list with 5 nodes

Slow
Fast
Middle
SF

1

0

2

1

3

2

4

3

5

4

null

Slow moves 1 step, Fast moves 2 steps

Variables
No variables to display
DepthFunction Call
Stack empty
0/5