From 67b028164a0dfdef3a64c76d863b43e02fccd1ea Mon Sep 17 00:00:00 2001 From: tecyang Date: Tue, 13 Mar 2018 21:23:30 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E5=89=91=E6=8C=87=20offer=20=E9=A2=98?= =?UTF-8?q?=E8=A7=A3.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加剑指offer中从尾到头打印链表描述和思路 --- notes/剑指 offer 题解.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notes/剑指 offer 题解.md b/notes/剑指 offer 题解.md index b7114ca2..33d6bbc9 100644 --- a/notes/剑指 offer 题解.md +++ b/notes/剑指 offer 题解.md @@ -193,6 +193,14 @@ public String replaceSpace(StringBuffer str) { ## 6. 从尾到头打印链表 +**题目描述** + +输入一个链表的头结点,从尾到头反过来打印出每个结点的值。 + +**解题思路** + +典型的"后进先出",可使用栈或者递归。 + 正向遍历然后调用 Collections.reverse()。 ```java