Skip to content

Commit

Permalink
Clarify ascend/descend description
Browse files Browse the repository at this point in the history
Add supllementary explainations for q_ascend and q_descend,
indicating the required memory operations that must be
implemented in these functions.
  • Loading branch information
backink authored and jserv committed Mar 18, 2024
1 parent c44d8e2 commit 7a02fb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ void q_sort(struct list_head *head, bool descend);
*
* No effect if queue is NULL or empty. If there has only one element, do
* nothing.
* Memory allocated to removed nodes must be freed.
*
* Reference:
* https://leetcode.com/problems/remove-nodes-from-linked-list/
Expand All @@ -222,6 +223,7 @@ int q_ascend(struct list_head *head);
*
* No effect if queue is NULL or empty. If there has only one element, do
* nothing.
* Memory allocated to removed nodes must be freed.
*
* Reference:
* https://leetcode.com/problems/remove-nodes-from-linked-list/
Expand Down
2 changes: 1 addition & 1 deletion scripts/checksums
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
186d420b53e21c6daf8eabe980a5b90780c53bcd queue.h
db6784ff3917888db4d1dceaa0570d99ed40e762 queue.h
3337dbccc33eceedda78e36cc118d5a374838ec7 list.h

0 comments on commit 7a02fb2

Please sign in to comment.