Skip to content

Create count negative numbers in matrix algorithm #8813

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

Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e14e0fb
updating DIRECTORY.md
Jun 7, 2023
2ba4830
Merge branch 'TheAlgorithms:master' into master
CaedenPH Jun 8, 2023
05e435f
feat: Count negative numbers in sorted matrix
CaedenPH Jun 8, 2023
83d877c
updating DIRECTORY.md
Jun 8, 2023
f0a785c
chore: Fix pre-commit
CaedenPH Jun 8, 2023
8cd5cdc
refactor: Combine functions into iteration
CaedenPH Jun 8, 2023
ea5b2d0
style: Reformat reference
CaedenPH Jun 8, 2023
0e346b2
feat: Add timings of each implementation
CaedenPH Jun 8, 2023
b58a340
chore: Fix problems with algorithms-keeper bot
CaedenPH Jun 8, 2023
3b16704
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 8, 2023
fca6e9d
test: Remove doctest from benchmark function
CaedenPH Jun 8, 2023
02cd4f3
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 9, 2023
63c5147
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 9, 2023
a55db73
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 10, 2023
0d8a616
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 10, 2023
9a7719c
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 10, 2023
7a2f01e
Update matrix/count_negative_numbers_in_sorted_matrix.py
CaedenPH Jun 10, 2023
97e2017
refactor: Use sum instead of large iteration
CaedenPH Jun 10, 2023
0f21b1b
refactor: Use len not sum
CaedenPH Jun 10, 2023
605be43
Update count_negative_numbers_in_sorted_matrix.py
cclauss Jun 10, 2023
21dbc02
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: Reformat reference
  • Loading branch information
CaedenPH committed Jun 8, 2023
commit ea5b2d0777ada189399557378cec9f5d654c1999
2 changes: 1 addition & 1 deletion matrix/count_negative_numbers_in_sorted_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Given an `m x n` matrix grid which is sorted in non-increasing order
Copy link
Member

Choose a reason for hiding this comment

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

Should there be a validate_matrix(matrix) function? We do not need to run it everywhere but we should have it if we want to validate test input.

both row-wise and column-wise, return the number of negative numbers in grid.

> https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix
Leetcode reference: https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix
"""


Expand Down