auto commit
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
[🍉 点击订阅面试进阶专栏 ](https://xiaozhuanlan.com/CyC2018)
|
||||
[🍉 点击阅读面试进阶指南 ](https://github.com/CyC2018/Backend-Interview-Guide)
|
||||
<!-- GFM-TOC -->
|
||||
* [3. 数组中重复的数字](#3-数组中重复的数字)
|
||||
* [4. 二维数组中的查找](#4-二维数组中的查找)
|
||||
@ -244,10 +244,11 @@ public String replaceSpace(StringBuffer str) {
|
||||
|
||||
```java
|
||||
public ArrayList<Integer> printListFromTailToHead(ListNode listNode) {
|
||||
if (listNode == null)
|
||||
return new ArrayList<>();
|
||||
ArrayList<Integer> ret = printListFromTailToHead(listNode.next);
|
||||
ret.add(listNode.val);
|
||||
ArrayList<Integer> ret = new ArrayList<>();
|
||||
if (listNode != null) {
|
||||
ret.addAll(printListFromTailToHead(listNode.next));
|
||||
ret.add(listNode.val);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user