Add Problem 42
Make Problem 42 more efficient