Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Project Euler problem 082 solution 1 #6282

Conversation

MaximSmolskiy
Copy link
Member

Describe your change:

Add Project Euler problem 082 solution 1:

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

@ghost ghost added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels Jul 28, 2022
@ghost ghost removed the tests are failing Do not merge until tests pass label Jul 28, 2022
@ghost ghost mentioned this pull request Jul 29, 2022
14 tasks
@MaximSmolskiy
Copy link
Member Author

@cclauss @dhruvmanila please review

@MaximSmolskiy
Copy link
Member Author

@dhruvmanila please review

1 similar comment
@MaximSmolskiy
Copy link
Member Author

@dhruvmanila please review

@MaximSmolskiy
Copy link
Member Author

@dhruvmanila please review

Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

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

Few minor nitpicks and it's good to go! Thanks for your patience!

import os


def solution(filename: str = "p082_matrix.txt") -> int:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def solution(filename: str = "p082_matrix.txt") -> int:
def solution(filename: str = "input.txt") -> int:

Simple name is better, we're already in the problem directory

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed

Comment on lines 40 to 41
m = len(matrix)
n = len(matrix[0])
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
m = len(matrix)
n = len(matrix[0])
rows = len(matrix)
cols = len(matrix[0])

I think this would be better for posterity. Please update wherever else is required.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed

@algorithms-keeper algorithms-keeper bot added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Mar 1, 2023
@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Mar 1, 2023
@MaximSmolskiy MaximSmolskiy requested review from dhruvmanila and removed request for Kush1101 March 1, 2023 19:22
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label Mar 2, 2023
@dhruvmanila dhruvmanila merged commit 069a14b into TheAlgorithms:master Mar 2, 2023
@MaximSmolskiy MaximSmolskiy deleted the add-project-euler-problem-082-solution-1 branch March 2, 2023 07:01
Cjkjvfnby pushed a commit to Cjkjvfnby/Python that referenced this pull request Mar 13, 2023
Update DIRECTORY.md
---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
sedatguzelsemme pushed a commit to sedatguzelsemme/Python that referenced this pull request Mar 19, 2023
Update DIRECTORY.md
---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
@isidroas isidroas mentioned this pull request Jan 25, 2025
14 tasks
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.

2 participants