It's the Xinrui Ma

Blog

Reverse a singly linked list.

Posted by in LeetCode on

Reverse a singly linked list.

click to show more hints.

Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?

Solution in Java: