mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-10 08:50:20 +08:00
Add linkedlist_deque.java
This commit is contained in:
@ -606,7 +606,7 @@ comments: true
|
||||
// 判空处理
|
||||
if h.isEmpty() {
|
||||
fmt.Println("error")
|
||||
return nil
|
||||
return nil
|
||||
}
|
||||
// 交换根结点与最右叶结点(即交换首元素与尾元素)
|
||||
h.swap(0, h.size()-1)
|
||||
|
Reference in New Issue
Block a user