Problem Set 5 for CS50