Skip to content

I added two algorithm related to matrix.#3364

Merged
siriak merged 11 commits intoTheAlgorithms:masterfrom
sadiul-hakim:master
Jan 14, 2023
Merged

I added two algorithm related to matrix.#3364
siriak merged 11 commits intoTheAlgorithms:masterfrom
sadiul-hakim:master

Conversation

@sadiul-hakim
Copy link
Copy Markdown
Contributor

Describe your change:

  • [x ] Add an algorithm?

References

Checklist:

  • [ x] I have read CONTRIBUTING.md.
  • [ x] This pull request is all my own work -- I have not plagiarized.
  • [ x] I know that pull requests will not be merged if they fail the automated tests.
  • [ x] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • [x ] All new Java files are placed inside an existing directory.
  • [x ] All functions and variable names follow Java naming conventions.

This algorithm is used to search a key from a sorted matrix.
This algorithm helps printing a matrix in spiral order.
Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

The code looks good, could you please add some JUnit tests? (see https://github.com/TheAlgorithms/Java/tree/master/src/test/java/com/thealgorithms)

@sadiul-hakim
Copy link
Copy Markdown
Contributor Author

Thank you for your reply. I'll try to add some test code as soon as possible..

Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

The search and its tests looks good. Could you make PrintAMatrixInSpiralOrder return what it intends to print as an array and add tests for that? Or just remove it and I can merge the search. Thanks!

Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@siriak siriak enabled auto-merge (squash) January 14, 2023 09:59
@siriak siriak merged commit d5f1404 into TheAlgorithms:master Jan 14, 2023
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