problem set 2 for cs 162 1959231