Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Ground for the House by thealfest1
def house(plan):
map = plan.split()
minx = xsize = len(map[0])
miny = ysize = len(map)
maxx = maxy = 0
for y in range(ysize):
for x in range(xsize):
if map[y][x] == '#':
minx = min(x, minx)
maxx = max(x, maxx)
miny = min(y, miny)
maxy = max(y, maxy)
return 0 if minx == xsize else (1 + maxy - miny)*(1 + maxx - minx)
April 25, 2019
Comments: