def _is_rect_full(arr, a, b):
    """Return true if the given rectangular portion is contiguous.
    Contiguous in this instance means that there are no empty tiles in the portion.
    """
    if a[0] == b[0] and a[1] == b[1]:
        return True

    start_r, end_r = min(a[0], b[0]), max(a[0], b[0])
    start_c, end_c = min(a[1], b[1]), max(a[1], b[1])

    for r in range(start_r, end_r + 1):
        for c in range(start_c, end_c + 1):
            if arr[r][c] == 0:
                return False

    return True