UCB CS61A homework 7