* @lc app=leetcode id=240 lang=javascript
* [240] Search a 2D Matrix II
* https://leetcode.com/problems/search-a-2d-matrix-ii/description/
* @param {number[][]} matrix
var searchMatrix = function (matrix, target) {
if (!matrix || matrix.length === 0) return false;
let rowIndex = matrix.length - 1;
while (rowIndex > 0 && target < matrix[rowIndex][colIndex]) {
while (colIndex < matrix[0].length) {
if (target === matrix[rowIndex][colIndex]) return true;
if (target > matrix[rowIndex][colIndex]) {
} else if (rowIndex > 0) {