Skip to content

added sumset.py Fixes: #{6563} - #6742

Merged
cclauss merged 8 commits into
TheAlgorithms:masterfrom
happiestbee:sumset
Oct 30, 2022
Merged

added sumset.py Fixes: #{6563}#6742
cclauss merged 8 commits into
TheAlgorithms:masterfrom
happiestbee:sumset

Conversation

@happiestbee

Copy link
Copy Markdown
Contributor

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@happiestbee
happiestbee requested a review from Kush1101 as a code owner October 6, 2022 04:32
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed require descriptive names This PR needs descriptive function and/or variable names labels Oct 6, 2022

@algorithms-keeper algorithms-keeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to 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.

Comment thread maths/sumset.py Outdated
"""


def sumset(A: set, B: set) -> set:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide descriptive name for the parameter: A

Please provide descriptive name for the parameter: B

@algorithms-keeper algorithms-keeper Bot removed the require descriptive names This PR needs descriptive function and/or variable names label Oct 6, 2022
Comment thread maths/sumset.py Outdated
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
@algorithms-keeper algorithms-keeper Bot added the tests are failing Do not merge until tests pass label Oct 6, 2022
@algorithms-keeper algorithms-keeper Bot removed the tests are failing Do not merge until tests pass label Oct 6, 2022
@happiestbee
happiestbee requested review from CaedenPH and removed request for Kush1101 October 6, 2022 16:25
@CenTdemeern1

Copy link
Copy Markdown
Contributor

Hey, the original author of the issue this fixes (#6563) said they'd like to do the implementation themselves. Please let them.

@CaedenPH CaedenPH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cclauss Looks good -

Comment thread maths/sumset.py
@@ -0,0 +1,37 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment thread maths/sumset.py
Comment on lines +5 to +7
Source:
https://en.wikipedia.org/wiki/Sumset

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Source:
https://en.wikipedia.org/wiki/Sumset
https://en.wikipedia.org/wiki/Sumset

Comment thread maths/sumset.py

>>> sumset({1, 2, 3}, {4, 5, 6})
{5, 6, 7, 8, 9}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment thread maths/sumset.py

>>> sumset({1, 2, 3}, {4, 5, 6, 7})
{5, 6, 7, 8, 9, 10}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@cclauss cclauss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Oct 30, 2022
@algorithms-keeper algorithms-keeper Bot added the awaiting reviews This PR is ready to be reviewed label Oct 30, 2022
@cclauss
cclauss merged commit 00fc53d into TheAlgorithms:master Oct 30, 2022
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants