c06p322.txt
来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 26 行
TXT
26 行
bool Map::isPath(int originCity, int destinationCity){ int nextCity; bool success, done; // mark the current city as visited markVisited(originCity); // base case: the destination is reached if (originCity == destinationCity) return true; else // try a flight to each unvisited city { done = false; success = getNextCity(originCity, nextCity); while (success && !done) { done = isPath(nextCity, destinationCity); if (!done) success = getNextCity(originCity, nextCity); } // end while return done; } // end if} // end isPath
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?