finish algorithm design week 5