Contains algorithm and c++ codes for different algorithms