Skip to content

Add Project Euler problem 082 solution 1 - #6282

Merged
dhruvmanila merged 6 commits into
TheAlgorithms:masterfrom
MaximSmolskiy:add-project-euler-problem-082-solution-1
Mar 2, 2023
Merged

Add Project Euler problem 082 solution 1#6282
dhruvmanila merged 6 commits into
TheAlgorithms:masterfrom
MaximSmolskiy:add-project-euler-problem-082-solution-1

Conversation

@MaximSmolskiy

Copy link
Copy Markdown
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}.

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

Copy link
Copy Markdown
MemberAuthor

@cclauss@dhruvmanila please review

@MaximSmolskiy

Copy link
Copy Markdown
MemberAuthor

@dhruvmanila please review

1 similar comment
@MaximSmolskiy

Copy link
Copy Markdown
MemberAuthor

@dhruvmanila please review

@MaximSmolskiy

Copy link
Copy Markdown
MemberAuthor

@dhruvmanila please review

@dhruvmaniladhruvmanila 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.

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

Comment threadproject_euler/problem_082/sol1.py Outdated
import os


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

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.

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

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

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Renamed

Comment threadproject_euler/problem_082/sol1.py Outdated
Comment on lines +40 to +41
m = len(matrix)
n = len(matrix[0])

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.

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
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Renamed

@algorithms-keeperalgorithms-keeperBot 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-keeperalgorithms-keeperBot 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 Kush1101March 1, 2023 19:22
@algorithms-keeperalgorithms-keeperBot removed the awaiting reviews This PR is ready to be reviewed label Mar 2, 2023
@dhruvmanila
dhruvmanila merged commit 069a14b into TheAlgorithms:masterMar 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>
@isidroasisidroas mentioned this pull request Jan 25, 2025
14 tasks
Sign up for freeto 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

@MaximSmolskiy@dhruvmanila