diff --git a/search_2d_matrix.cpp b/search_2d_matrix.cpp new file mode 100644 index 0000000..03637b6 --- /dev/null +++ b/search_2d_matrix.cpp @@ -0,0 +1,21 @@ +class Solution { +public: +bool searchMatrix(vector& matrix, int target) { + + int rowsize=matrix.size(); + int colsize=matrix[0].size(); + int i=0, j=colsize-1; + while(i>=0 && i=0 && jtarget) + j--; + else if(arr