Tutoriel Approfondi sur les Concepts Avancés du C++
11.1 Recherche en profondeur (DFS)
11.1.1 Concepts de base
Le DFS (Depth-First Search) est un algorithme récursif qui explore un chemin jusqu'au bout puis fait marche arrière.
Gabarit de base
void dfs(int etat) {
// 1. Condition d'arrêt
if (condition satisfaite) {
traiter le résultat;
return;
}
// 2. Élagage ...
Publié le 10 juin à 06h55