Implementations of exercises from CLRS