View gist:7334581
import numpy as np | |
from matplotlib import pyplot as plt | |
def waterfill(walls): | |
land = np.zeros((len(walls), max(walls)), dtype=int) | |
# Put the walls | |
for index, value in enumerate(walls): |