Comp132 Midterm2 solution