How to search a given key in a sorted row and column matrix

Please share the code to search a given key in a sorted row and column matrix.

@Tiwary725

image