implete some sort algorithms in c++