solution to some probels in CLRS