Skip to content
Snippets Groups Projects
Commit 7a02fb25 authored by Lin Chun Yeh's avatar Lin Chun Yeh Committed by Jim Huang
Browse files

Clarify ascend/descend description

Add supllementary explainations for q_ascend and q_descend,
indicating the required memory operations that must be
implemented in these functions.
parent c44d8e22
No related branches found
No related tags found
No related merge requests found
......@@ -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/
......@@ -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/
......
186d420b53e21c6daf8eabe980a5b90780c53bcd queue.h
db6784ff3917888db4d1dceaa0570d99ed40e762 queue.h
3337dbccc33eceedda78e36cc118d5a374838ec7 list.h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment