text: """
  Search In Sorted Matrix:
  
  You're given a two-dimensional array (a matrix) of distinct integers and a target integer.
  Each row in the matrix is sorted, and each column is also sorted; the matrix doesn't necessarily have the same height and width.
  Write a function that returns an array of the row and column indices of the target integer if it's contained in the matrix, otherwise [-1, -1].
  
  Sample Input:
      matrix = [
      [1, 4, 7, 12, 15, 1000],
      [2, 5, 19, 31, 32, 1001],
      [3, 8, 24, 33, 35, 1002],
      [40, 41, 42, 44, 45, 1003],
      [99, 100, 103, 106, 128, 1004],
      ]
      target = 44
  Sample Output:
      [3, 3]
      
  https://www.algoexpert.io/questions/Search%20In%20Sorted%20Matrix
  """
  
  
  def searchInSortedMatrix(matrix, target):
  
      # start at top right
      row = 0
      col = len(matrix[0]) - 1
      while row < len(matrix) and col >= 0:
          if matrix[row][col] > target:
              col -= 1  # move left
          elif matrix[row][col] < target:
              row += 1  # move down
          else:
              return[row, col]
  
      return[-1, -1]
  