Problem Set 3 for CS50x