Finding time every day at dedicated time is very tuff as currently involved in multiple things. You contact me if you need any help on any specific problem.
class Solution { public boolean searchMatrix(int[][] matrix, int target) { int m=matrix.length; int n=matrix[0].length; int row=0,col=n-1; if(matrix[row][col]==target) return true; while(row=0) { if(matrix[row][col]
@@Tarunkumar-gs4mm ya it can happen with anyone anytime but one should learn from mistakes now try to make habit to double check all conditions and try to simulate and dry run 1-2 test-cases.
How did you come up with the O(m+n) solution? I mean how you got to know where to start the pointer?
What an explanation!!!!.........Thank you sir
why can't we apply binary serach on this question similar to the search the matrix question
Because the entire matrix isn't sorted
Matrix Problem Playlist - th-cam.com/play/PLamEquLLzOtjEph8ZqcTOt0tCEfj4PZfy.html
awesomee
Can you please start live session of leetcode problems from tomorrow at particular time ?
Finding time every day at dedicated time is very tuff as currently involved in multiple things. You contact me if you need any help on any specific problem.
class Solution {
public boolean searchMatrix(int[][] matrix, int target) {
int m=matrix.length;
int n=matrix[0].length;
int row=0,col=n-1;
if(matrix[row][col]==target)
return true;
while(row=0)
{
if(matrix[row][col]
i tried submitting this code but it show error
check condition in ur while loop. Why row < col ?
@@NareshGupta thanks man!!
sometimes silly mistakes just ruin your day
that what happened with me
@@Tarunkumar-gs4mm ya it can happen with anyone anytime but one should learn from mistakes now try to make habit to double check all conditions and try to simulate and dry run 1-2 test-cases.
@@NareshGupta yaah thanks for advice