0876. Middle of the Linked List

https://leetcode.com/problems/middle-of-the-linked-list

Description

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:

Example 2:

Constraints:

  • The number of nodes in the list is in the range [1, 100].

  • 1 <= Node.val <= 100

ac

Last updated

Was this helpful?