It's showing TLE error for matrix search

matrix search :- https://ide.codingblocks.com/s/208928

You weren’t breaking from the loop after finding the element. Here i corrected your code https://ide.codingblocks.com/s/209045