* assignment 2, algorithms part I