c++ maze problem _ algorithm implementation _ source code original