Given a non-empty, singly linked list with head node head
, return a middle node of linked list.
If there are two middle nodes, return the second middle node.
Example 1:
1 |
Input: [1,2,3,4,5] |
Example 2:
1 |
Input: [1,2,3,4,5,6] |
1 |
|
Given a non-empty, singly linked list with head node head
, return a middle node of linked list.
If there are two middle nodes, return the second middle node.
Example 1:
1 |
Input: [1,2,3,4,5] |
Example 2:
1 |
Input: [1,2,3,4,5,6] |
1 |
|
近期评论