Some algorithm implementation in c++ for practice...