diff --git a/chapter_stack_and_queue/deque.md b/chapter_stack_and_queue/deque.md index c65de91bc..478a63f54 100644 --- a/chapter_stack_and_queue/deque.md +++ b/chapter_stack_and_queue/deque.md @@ -2499,11 +2499,7 @@ comments: true return deque->queSize == 0; } - /* 判断双向队列是否为空 */ - bool empty(arrayDeque *deque) { - return deque->queSize == 0; - } - + /* 计算环形数组索引 */ int dequeIndex(arrayDeque *deque, int i) { // 通过取余操作实现数组首尾相连 // 当 i 越过数组尾部时,回到头部