algorithm hw5