added algorithm to remove duplicates from a linked list#9395
added algorithm to remove duplicates from a linked list#9395pa-kh039 wants to merge 6 commits intoTheAlgorithms:masterfrom pa-kh039:new-branch
Conversation
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| temp_node.next_node = new_node | ||
| return head | ||
|
|
||
| def remove_duplicates(head:Node | None): |
There was a problem hiding this comment.
Please provide return type hint for the function: remove_duplicates. If the function does not return a value, please provide the type hint as: def function() -> None:
for more information, see https://pre-commit.ci
|
Please do not request reviews of pull requests when the tests are failing. I wrote #9323 (review) and that is the way that I would like us to deal with all new linked list algorithms. |
|
@cclauss all checks have passed, sorry for the trouble caused |
cclauss
left a comment
There was a problem hiding this comment.
We need class LinkedList: like:
https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/reverse_k_group.py#L13
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| @@ -0,0 +1,46 @@ | |||
| from future import __annotations__ | |||
|
|
|||
| def subsequenceCounting(s1: str, s2: str, n: int, m: int) -> int: | |||
There was a problem hiding this comment.
Variable and function names should follow the snake_case naming convention. Please update the following name accordingly: subsequenceCounting
Please provide descriptive name for the parameter: n
Please provide descriptive name for the parameter: m
for more information, see https://pre-commit.ci
Describe your change:
Checklist: