finished hw1 in algorithms