Grokking Microsoft Coding Interview

0% completed

Reverse a LinkedList (easy)

Problem Statement

Try it yourself

Problem Statement

Given the head of a Singly LinkedList, reverse the LinkedList. Write a function to return the new head of the reversed LinkedList.

Image

Constraints:

  • The number of nodes in the list is the range [0, 5000].
  • -5000 <= Node.val <= 5000

Try it yourself

Try solving this question here:

Python3
Python3

. . . .
Mark as Completed

On This Page

Problem Statement

Try it yourself