diff --git a/C++/1351:Count Negative Numbers in a Sorted Matrix b/C++/1351:Count Negative Numbers in a Sorted Matrix new file mode 100644 index 0000000..d04501b --- /dev/null +++ b/C++/1351:Count Negative Numbers in a Sorted Matrix @@ -0,0 +1,18 @@ +//Time complexity O(m*n) + +class Solution +{ +public: + int countNegatives(vector>& grid) + { + int count = 0; + for(int i=0; i