Skip to content

Add negative int support to 3n+1#6108

Closed
Rudxain wants to merge 14 commits into
TheAlgorithms:masterfrom
Rudxain:patch-1
Closed

Add negative int support to 3n+1#6108
Rudxain wants to merge 14 commits into
TheAlgorithms:masterfrom
Rudxain:patch-1

Conversation

@Rudxain
Copy link
Copy Markdown

@Rudxain Rudxain commented Apr 25, 2022

Describe your change:

Now the n31 algorithm has been extended to support negative integers, and has protection against infinite looping by checking for 0. The algorithm is still simple enough, so it's still useful for educational purposes

  • 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}.

@Rudxain Rudxain marked this pull request as ready for review April 25, 2022 07:31
@Rudxain Rudxain requested a review from Kush1101 as a code owner April 25, 2022 07:31
@ghost ghost added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Apr 25, 2022
@Rudxain Rudxain changed the title Added negative int support Added negative int support to 3n+1 Apr 25, 2022
@Rudxain Rudxain changed the title Added negative int support to 3n+1 Add negative int support to 3n+1 Apr 25, 2022
@ghost ghost added the tests are failing Do not merge until tests pass label May 31, 2022
@Rudxain
Copy link
Copy Markdown
Author

Rudxain commented May 31, 2022

What went wrong? It seems it's the formatting, but where?

@Rudxain
Copy link
Copy Markdown
Author

Rudxain commented Jul 8, 2022

For some reason, it seems like I accidentally deleted some digits from the file while editing. It should be fixed now

@stale
Copy link
Copy Markdown

stale Bot commented Aug 13, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale Used to mark an issue or pull request stale. label Aug 13, 2022
@cclauss
Copy link
Copy Markdown
Member

cclauss commented Oct 1, 2022

In preparation for that denial-of-service attack that is Hacktoberfest, I am closing all pull requests that have failing tests.

@cclauss cclauss closed this Oct 1, 2022
@Rudxain
Copy link
Copy Markdown
Author

Rudxain commented Oct 1, 2022

What? But (AFAIK) the (new) failing tests were not my fault, it was from upstream. I don't understand

@Rudxain
Copy link
Copy Markdown
Author

Rudxain commented Nov 21, 2022

@cclauss can I (and should I) open a new PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files stale Used to mark an issue or pull request stale. tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants