Update LinkedListAlgo.java
fix
This commit is contained in:
parent
4e75d73e00
commit
0747104188
@ -20,12 +20,7 @@ public class LinkedListAlgo {
|
||||
pre = curr;
|
||||
curr = next;
|
||||
}
|
||||
//我的比教程更加简洁
|
||||
if (pre == null) {
|
||||
return list;
|
||||
} else {
|
||||
return pre;
|
||||
}
|
||||
return pre;
|
||||
}
|
||||
|
||||
// 检测环
|
||||
|
Loading…
Reference in New Issue
Block a user