C++ algorithm Daquan (primary and intermediate programmers must)