206. Reverse Linked List

March 11, 2020 · View on GitHub

| English | 简体中文 |

206. Reverse Linked List

Description

Reverse a singly linked list.

Example:

Input: 1->2->3->4->5->NULL
Output: 5->4->3->2->1->NULL

Follow up:

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

Related Topics

  • Linked List

Similar Questions

  • Reverse Linked List II
  • Binary Tree Upside Down
  • Palindrome Linked List

Contents

  1. 1Description
  2. 2Related Topics
  3. 3Similar Questions