⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ispathrecursive.cpp

📁 Data Abstraction & Problem Solving with C++源码
💻 CPP
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -