Skip to content

Commit 51efae0

Browse files
committed
Use 'delete' in q_ascend and q_descend description
As q_ascend and q_descend require freeing the removed node, use the proper word 'delete' in their function descriptions. Remove redundant words after replacement. Change-Id: Ic2e20c6188d91da5f7a64decf86621ef80cf1ab4
1 parent 29d90ea commit 51efae0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

queue.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,12 @@ void q_reverseK(struct list_head *head, int k);
201201
void q_sort(struct list_head *head, bool descend);
202202

203203
/**
204-
* q_ascend() - Remove every node which has a node with a strictly less
204+
* q_ascend() - Delete every node which has a node with a strictly less
205205
* value anywhere to the right side of it.
206206
* @head: header of queue
207207
*
208208
* No effect if queue is NULL or empty. If there has only one element, do
209209
* nothing.
210-
* Memory allocated to removed nodes must be freed.
211210
*
212211
* Reference:
213212
* https://leetcode.com/problems/remove-nodes-from-linked-list/
@@ -217,13 +216,12 @@ void q_sort(struct list_head *head, bool descend);
217216
int q_ascend(struct list_head *head);
218217

219218
/**
220-
* q_descend() - Remove every node which has a node with a strictly greater
219+
* q_descend() - Delete every node which has a node with a strictly greater
221220
* value anywhere to the right side of it.
222221
* @head: header of queue
223222
*
224223
* No effect if queue is NULL or empty. If there has only one element, do
225224
* nothing.
226-
* Memory allocated to removed nodes must be freed.
227225
*
228226
* Reference:
229227
* https://leetcode.com/problems/remove-nodes-from-linked-list/

0 commit comments

Comments
 (0)