Problem Set 5 for CS50x