common sorting algorimths implemented by C++