Search in a Row-Wise and Column-Wise Sorted Matrix
Problem
Given a matrix where each row is sorted in ascending order and each column is sorted in ascending order, find whether a given number exists in the matrix.
Example:
Input:
matrix = [
[1, 4, 7, 11],
[2, 5, 8, 12],
[3, 6, 9, 16],
[10, 13, 14, 17]
], target = 5
Output: true