excersises from algo chapter (not finished)