def minArea(self, image: List[List[str]], x: int, y: int) -> int:
    if ((not image) or (not image[0])):
        return 0
    (n, m) = (len(image), len(image[0]))
    (a, b, c, d) = (n, m, 0, 0)
    for i in range(n):
        for j in range(m):
            if (image[i][j] == '1'):
                a = min(a, i)
                b = min(b, j)
                c = max(c, i)
                d = max(d, j)
    return (((c + 1) - a) * ((d + 1) - b))
def minArea(self, image: List[List[str]], x: int, y: int) -> int:
    if ((not image) or (not image[0])):
        return 0
    (n, m) = (len(image), len(image[0]))
    (a, b, c, d) = (n, m, 0, 0)
    for i in range(n):
        for j in range(m):
            if (image[i][j] == '1'):
                a = min(a, i)
                b = min(b, j)
                c = max(c, i)
                d = max(d, j)
    return (((c + 1) - a) * ((d + 1) - b))