Solution to Histogram Exercise