work on unit 2 of intro to algorithms