Problem Submissions Solution

Reverse a Linked List

Difficulty: Easy

Acceptance: %

Points: 20.00

Given the head of a linked list, the task is to reverse this list and return the reversed head.


Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n)

Expected Space Complexity: O(1)

Constraints:
  • 1 <= number of nodes, data of nodes <= 10^5
Companies:
Amazon Microsoft Samsung Walmart Paypal + 1 more
Topics:
Linked List
Locked Content
Access Restricted: Please Login to access the code editor and test cases.