Added solution to problem 2 of chapter 1
Added a test case