Not able to pass 2nd test case 
What is wrong with my code? https://ide.codingblocks.com/#/s/18064
https://hack.codingblocks.com/practice/p/373/705
TIA!
MATRIX SEARCH -- not able pass 2nd test case
Akriti ur code is not passing test cases having rows and cols different and also for some cases when row and col are equal.
Make seperate cases for rows and col and then solve it make solving easy.
I did make separate cases for rows and columns. Line 20-28 tells which row could the answer lie in and line 30-41 searches for the element in that row. And I tried for a lot of test cases that I could think of but I am still not able to spot the error.
here it is my code ,it always gave correct ans for rows=col
but sometimes it gave wromg and when rows>>col && col>>rows ,i am working on this ,u can check this code
https://ide.codingblocks.com/#/s/18065