Assignment 3 from the Stanford CS106A course