Bogo sort algorith implementation in Cpp