Skip to content

Commit

Permalink
Clarify the operation about deleting duplicates (#174)
Browse files Browse the repository at this point in the history
The original comment states that false is returned when list head is
NULL. However, this is inconsistent with functions such as
'q_delete_mid' and has been confirmed to be a typo.
  • Loading branch information
lumynou5 authored Mar 18, 2024
1 parent f087e77 commit c44d8e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ bool q_delete_mid(struct list_head *head);
* Reference:
* https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
*
* Return: true for success, false if list is NULL.
* Return: true for success, false if list is NULL or empty.
*/
bool q_delete_dup(struct list_head *head);

Expand Down
2 changes: 1 addition & 1 deletion scripts/checksums
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
444bab14cb8ad4c949f61b3c10a22a3ed2401425 queue.h
186d420b53e21c6daf8eabe980a5b90780c53bcd queue.h
3337dbccc33eceedda78e36cc118d5a374838ec7 list.h

0 comments on commit c44d8e2

Please sign in to comment.