Solución
solution.tsTypeScript
export function searchMatrix(matrix: number[][], target: number): boolean {
// Escribe tu solución aquí
if (matrix.length === 0) return false;
let row = 0;
let col = matrix.length - 1;
while (row < matrix.length && col >= 0) {
if (matrix[row][col] === target) return true;
if (matrix[row][col] > target) {
col--;
}
if (matrix[row][col] < target) {
row++;
}
}
return false;
}0respuestas