started prob 7 with some fancy approx
deleted unnecessary code
solved prob 7 in linear time