For the best experience, increase the window size or view on a laptop or desktop device
Last updated: Pending
Title | ||
|---|---|---|
Loading... | ||
1/1
No questions are available yet
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
Given the head of a singly linked list, reverse the list, and return the reversed list.
Example 1:
Output: [5,4,3,2,1]
Example 2:
Output: [2,1]
Example 3:
Output: []
Constraints:
[0, 5000].5000 <= Node.val <= 5000.Given the head of a singly linked list, reverse the list, and return the reversed list.
Example 1:
Output: [5,4,3,2,1]
Example 2:
Output: [2,1]
Example 3:
Output: []
Constraints:
[0, 5000].5000 <= Node.val <= 5000.Output