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