leetcode
  • 介绍
  • 1. Two Sum
  • 2. Add Two Numbers
  • 3. Longest Substring Without Repeating Characters
  • 5. Longest Palindromic Substring
  • 7. Reverse Integer
  • 9. Palindrome Number
  • 20. Valid Parentheses
  • 26. Remove Duplicates from Sorted Array
  • 55. Jump Game
  • 62. Unique Paths
  • 63. Unique Paths II
  • 78. Subsets
  • 88. Merge Sorted Array
  • 94. Binary Tree Inorder Traversal
  • 104. Maximum Depth of Binary Tree
  • 107. Binary Tree Level Order Traversal II
  • 121. Best Time to Buy and Sell Stock
  • 136. Single Number
  • 206. Reverse Linked List
  • 287. Find the Duplicate Number
  • 344. Reverse String
  • 412. Fizz Buzz
  • 493. Reverse Pairs
  • 496. Next Greater Element I
  • 633. Sum of Square Numbers
  • 654. Maximum Binary Tree
  • 826. Most Profit Assigning Work
  • 905. Sort Array By Parity
  • 977. Squares of a Sorted Array
  • 1021. Remove Outermost Parentheses
  • 1022. Sum of Root To Leaf Binary Numbers
Powered by GitBook
On this page
  • 描述
  • 解答

Was this helpful?

206. Reverse Linked List

描述

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?

解答

见2.Add Two Numbers扩展。

Previous136. Single NumberNext287. Find the Duplicate Number

Last updated 6 years ago

Was this helpful?