<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Linked List on Chunixz情报中心</title>
    <link>https://chunixz.github.io/tags/linked-list/</link>
    <description>Recent content in Linked List on Chunixz情报中心</description>
    <image>
      <title>Chunixz情报中心</title>
      <url>https://chunixz.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://chunixz.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- gohugo.io</generator><atom:link href="https://chunixz.github.io/tags/linked-list/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Leetcode 206. Reverse Linked List</title>
      <link>https://chunixz.github.io/posts/2019-03-22-1/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://chunixz.github.io/posts/2019-03-22-1/</guid>
      <description>206. Reverse Linked List Reverse a singly linked list. Example: Input: 1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5-&amp;gt;NULL Output: 5-&amp;gt;4-&amp;gt;3-&amp;gt;2-&amp;gt;1-&amp;gt;NULL Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both?
分析 最简单的方式，通过Stack来入栈出栈操作实现。 Java代码实现 class Solution { public ListNode reverseList(ListNode head) { if (head == null || head.next == null) { return head; } Stack&amp;lt;ListNode&amp;gt; stack = new Stack&amp;lt;&amp;gt;(); while (head != null) { stack.push(head); head = head.next; } ListNode tempNode = stack.</description>
    </item>
    
  </channel>
</rss>
