DSA HW2 first half