mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-23 17:54:27 +08:00
build
This commit is contained in:
@ -1056,7 +1056,7 @@ Below is the code for implementing a queue using a linked list:
|
||||
/* 析构函数 */
|
||||
void delLinkedListQueue(LinkedListQueue *queue) {
|
||||
// 释放所有节点
|
||||
for (int i = 0; i < queue->queSize && queue->front != NULL; i++) {
|
||||
while (queue->front != NULL) {
|
||||
ListNode *tmp = queue->front;
|
||||
queue->front = queue->front->next;
|
||||
free(tmp);
|
||||
|
Reference in New Issue
Block a user