Title: Add solutions for searching in 2D matrix (LeetCode #74 and #240) by MohakAgrawal25 · Pull Request #6640 · TheAlgorithms/Java · GitHub
Open Graph Title: Add solutions for searching in 2D matrix (LeetCode #74 and #240) by MohakAgrawal25 · Pull Request #6640 · TheAlgorithms/Java
X Title: Add solutions for searching in 2D matrix (LeetCode #74 and #240) by MohakAgrawal25 · Pull Request #6640 · TheAlgorithms/Java
Description: I have read CONTRIBUTING.md. This pull request is all my own work -- I have not plagiarized it. All filenames are in PascalCase. All functions and variable names follow Java naming conventions. All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations. All new code is formatted with clang-format -i --style=file path/to/your/file.java Pull Request Description What does this PR do? Adds implementations for the "Search a 2D Matrix" problem (both variations) commonly found on LeetCode (#74 and #240). These algorithms are added under src/main/java/com/thealgorithms/matrix to provide useful matrix search solutions. Why is this needed? The current matrix directory lacks solutions for these frequently asked interview problems. Adding them will help learners and contributors understand efficient ways to search in 2D matrices. Changes made: Implemented Search2DMatrix.java containing methods for both matrix search variations. Code follows Java naming conventions and project formatting guidelines. Added relevant LeetCode URLs and explanations in comments for educational purposes. Related Issue: Fixes #6622
Open Graph Description: I have read CONTRIBUTING.md. This pull request is all my own work -- I have not plagiarized it. All filenames are in PascalCase. All functions and variable names follow Java naming conventions. ...
X Description: I have read CONTRIBUTING.md. This pull request is all my own work -- I have not plagiarized it. All filenames are in PascalCase. All functions and variable names follow Java naming conventions. ...
Opengraph URL: https://github.com/TheAlgorithms/Java/pull/6640
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8b7a1340-f1b3-ea39-9423-570217f5a121 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 937A:309E0A:628164:872125:6A50757A |
| html-safe-nonce | 1c8e0686a5e905329fc719e9c9f21879745ac22df77b8755492ed794a491b68b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzdBOjMwOUUwQTo2MjgxNjQ6ODcyMTI1OjZBNTA3NTdBIiwidmlzaXRvcl9pZCI6IjMxMTM0MTg5NDcwOTA3NDA2MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 57b5dd6a2c5aa953bc812259f752a08c765342e4eb3645c387f84501d4386791 |
| hovercard-subject-tag | pull_request:2887904973 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/TheAlgorithms/Java/pull/6640/files |
| twitter:image | https://avatars.githubusercontent.com/u/163795673?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/163795673?s=400&v=4 |
| og:image:alt | I have read CONTRIBUTING.md. This pull request is all my own work -- I have not plagiarized it. All filenames are in PascalCase. All functions and variable names follow Java naming conventions. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/TheAlgorithms/Java git https://github.com/TheAlgorithms/Java.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 63477660 |
| octolytics-dimension-repository_nwo | TheAlgorithms/Java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63477660 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Java |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width