Added problem 3 of Chapter 6 for MIT Intro to Computer Science