Solution to Assigment 2