PythiloMedium · 25 min · Task 69 of 100 · progress kept in this browser

Search a globally sorted matrix

Return whether target appears in a rectangular matrix whose rows are sorted and each row begins after the previous row ends. Use logarithmic comparisons.

flat_index, columns = 4, 3
print(divmod(flat_index, columns))
Your task

Return whether target appears in a rectangular matrix whose rows are sorted and each row begins after the previous row ends. Use logarithmic comparisons.