Solution for CS425 HW1, Q2