algo3: hw5: problem 1 started