Merge pull request #51 from Tecyang/master

Update 剑指 offer 题解.md
This commit is contained in:
CyC2018 2018-03-13 21:32:35 +08:00 committed by GitHub
commit 073df8eb99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,6 +193,14 @@ public String replaceSpace(StringBuffer str) {
## 6. 从尾到头打印链表
**题目描述**
输入一个链表的头结点,从尾到头反过来打印出每个结点的值。
**解题思路**
典型的"后进先出",可使用栈或者递归。
正向遍历然后调用 Collections.reverse()。
```java