Answer from cs61c-ek (jin tang li 15994133) for Question 2 because the second one runs faster, and it is simpler