Implementations of a few algorithms and datastrucures