Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Stone Wall by yoichi
def stone_wall(wall):
array = wall.lstrip().splitlines()
for i in range(len(array[0])):
w = sum(row[i] == '#' for row in array)
if i == 0:
candidate = (i, w)
else:
if w < candidate[1]:
candidate = (i, w)
return candidate[0]
Feb. 4, 2019