Change to C++ project.

Signed-off-by: CyberZHG <cyberzhg@gmail.com>
Basic algorithm.

Signed-off-by: CyberZHG <cyberzhg@gmail.com>