Adding solution for lab5

Adding the source of the solutions used by TA in lab 5 while solving
problems on the whiteboard.