Add linkedlist_deque.java

This commit is contained in:
Yudong Jin
2023-01-20 02:45:09 +08:00
parent 1cc743e97a
commit 43d8520291
2 changed files with 185 additions and 1 deletions

View File

@ -606,7 +606,7 @@ comments: true
// 判空处理
if h.isEmpty() {
fmt.Println("error")
return nil
return nil
}
// 交换根结点与最右叶结点(即交换首元素与尾元素)
h.swap(0, h.size()-1)