Problem
A linked list is a chain of nodes. Each node holds a value and a link to the next node. The last node links to no node.
You get head, the first node of a linked list. Reverse the list and return the head of the reversed list.
Example 1
- Input:
- head = [3,8,1,6]
- Output:
- [6,1,8,3]
Example 2
- Input:
- head = [10,20]
- Output:
- [20,10]
Example 3
- Input:
- head = []
- Output:
- []
- Explanation:
- An empty list stays empty.
Constraints
- The number of nodes in the list is in the range [0, 5000].
- -5000 <= Node.val <= 5000
Follow-up
You can reverse the list with a loop or with recursion. Try to write both solutions.
SysRound wrote this statement. A reference solution checks every example.
Related questions
Continue with questions that share topics or the same question type.
- Palindrome Linked List
Coding · Linked List · Recursion · Stack
- Reverse Nodes in k-Group
Coding · Linked List · Recursion
- Add Two Numbers
Coding · Linked List · Math · Recursion
- Merge Two Sorted Lists
Coding · Linked List · Recursion
Sources · 2 references
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 206. Reverse Linked List
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source
LeetCode company tags · 3 records
Apple
Reverse Linked List
Reported date not specified · Source window: 3mo
Source snapshot: Oct 20, 2026
Source frequency score: 51.2. This is not an interview probability.
View sourceApple
Reverse Linked List
Reported date not specified · Source window: 6mo
Source snapshot: Oct 20, 2026
Source frequency score: 56.6. This is not an interview probability.
View sourceTikTok
Reverse Linked List
Reported date not specified · Source window: 6mo