terminal
Elevo
/
ESC
Login
Initiate Registration
code
Topics
corporate_fare
Companies
history
History
arrow_back
Back to Challenges
#206
Reverse Linked List
Easy
Acceptance 0%
Editorial
description
Problem Description
Given the `head` of a singly linked list, reverse the list, and return the reversed list.
checklist
Constraints
The number of nodes in the list is the range [0, 5000].
-5000 <= Node.val <= 5000
science
Examples
Case #1
In:
head = [1,2,3,4,5]
Out:
[5,4,3,2,1]
Case #2
In:
head = [1,2]
Out:
[2,1]
Mastery Tags
Linked List
Recursion
Hiring Companies
Amazon
Apple
Microsoft
code
Integrated IDE
Python 3
expand_more
C
C++ 17
Java
JavaScript
Python 3
C
C++ 17
Java
JavaScript
Python 3
refresh
class Solution: def reverseList(self, head: ListNode) -> ListNode: pass
Login to Compile
Processing
terminal
Debug Output
home
Home
extension
Practice
robot_2
login
Sign In
account_circle
Menu
code_blocks
Coding
psychology
Aptitude
Navigation
close
Login
Registration