// ERROR A PROPÓSITO: DFS recursivo sobre un camino muy largo. Cada nodo gasta un marco de llamada.
#include <cstdlib>
#include <iostream>

#include "../traversals.h"

int main(int argc, char* argv[]) {
    int n = argc > 1 ? std::atoi(argv[1]) : 1000;
    Graph path(n);
    for (int i = 0; i + 1 < n; i++) {
        path.add_edge(i, i + 1);
    }
    std::cout << "con pila propia: " << dfs_iterative(path, 0).size() << " nodos" << std::endl;
    std::cout << "con recursion: " << dfs_recursive(path, 0).size() << " nodos" << std::endl;
    return 0;
}
