ByteByteGo logo
menuProblems List

Linked List Midpoint

Easy

Given a singly linked list, find and return its middle node. If there are two middle nodes, return the second one.

Example 1:

Output: Node 4

Example 2:

Output: Node 4

Constraints:

  • The linked list contains at least one node.
  • The linked list contains unique values.

You can practice coding exercises online by logging into bytebytego.com on your laptop.