feat(arrays, puzzles, matrix): lucky number in a matrix#115
feat(arrays, puzzles, matrix): lucky number in a matrix#115BrianLusina merged 3 commits intomainfrom
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new "Lucky Numbers in a Matrix" puzzle: documentation, two implementations ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
DIRECTORY.md (1)
487-488: Lucky Numbers entry looks correct; markdownlint indent warning is likely stylisticThe new directory entries and test link follow the existing patterns for
puzzles/arraysand point to the expected path. The markdownlint MD007 warning about indentation (2 vs 4 spaces) conflicts with the indentation already used by neighboring items in this section, so it’s more of a style/configuration concern than a content issue. If your pipeline enforces MD007 strictly, you may want to either tweak this list’s indentation globally or relax that rule for this file, rather than changing just these two lines.puzzles/arrays/lucky_numbers_in_a_matrix/test_lucky_numbers_in_a_matrix.py (1)
1-40: Solid parameterized coverage of the lucky_numbers behaviorThe tests exercise the core cases well: multiple 3×3 and 4×4 matrices with and without lucky numbers, plus the 1×1 edge case, all matching the definition used in the implementation. Using
parameterized.expandkeeps the suite compact and readable. If you want to push coverage slightly further, you could add an explicitly non-square rectangular case (e.g., 2×3) to demonstrate that the logic doesn’t rely on squareness, but that’s optional given the current constraints.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (19)
puzzles/arrays/lucky_numbers_in_a_matrix/images/examples/lucky_numbers_in_a_matrix_example_1.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/examples/lucky_numbers_in_a_matrix_example_2.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/examples/lucky_numbers_in_a_matrix_example_3.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_1.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_10.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_11.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_12.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_13.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_14.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_15.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_16.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_2.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_3.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_4.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_5.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_6.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_7.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_8.pngis excluded by!**/*.pngpuzzles/arrays/lucky_numbers_in_a_matrix/images/solutions/lucky_numbers_in_a_matrix_solution_9.pngis excluded by!**/*.png
📒 Files selected for processing (4)
DIRECTORY.md(1 hunks)puzzles/arrays/lucky_numbers_in_a_matrix/README.md(1 hunks)puzzles/arrays/lucky_numbers_in_a_matrix/__init__.py(1 hunks)puzzles/arrays/lucky_numbers_in_a_matrix/test_lucky_numbers_in_a_matrix.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
puzzles/arrays/lucky_numbers_in_a_matrix/test_lucky_numbers_in_a_matrix.py (1)
puzzles/arrays/lucky_numbers_in_a_matrix/__init__.py (1)
lucky_numbers(4-54)
🪛 LanguageTool
puzzles/arrays/lucky_numbers_in_a_matrix/README.md
[grammar] ~56-~56: Ensure spelling is correct
Context: ...est_min or c_smallest_max. Otherwise if now matching value is found, we return an e...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[style] ~81-~81: Using many exclamation marks might seem excessive (in this case: 15 exclamation marks for a text that’s 5161 characters long)
Context: ...cky_numbers_in_a_matrix_solution_1.png)

🪛 markdownlint-cli2 (0.18.1)
DIRECTORY.md
487-487: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
488-488: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
puzzles/arrays/lucky_numbers_in_a_matrix/README.md
39-39: Multiple spaces after blockquote symbol
(MD027, no-multiple-space-blockquote)
45-45: Multiple spaces after blockquote symbol
(MD027, no-multiple-space-blockquote)
Describe your change:
Finds the lucky number in a matrix where a lucky number is a number that is the minimum in its row, but the maximum in its column
Checklist:
Fixes: #{$ISSUE_NO}.Summary by CodeRabbit
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.