Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
One Line to Largest Rectangle in a Histogram solution in Clear category for Largest Rectangle in a Histogram by damiankulus
from itertools import combinations_with_replacement as comb
def largest_histogram(h):
return max(len(f)*min(f) for f in (h[c[0]:c[1]+1] for c in comb(range(len(h)),2)))
Feb. 20, 2021