| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/Arhantcode1/Data-Structures-Algorithms/master/Graphs/DFS.cpp | [Back] [Original] |
#include
using namespace std;
#define N 100
int visited[N];
void dfs_iterative(vector graph[], int node){
stack stack_dfs;
stack_dfs.push(node);
visited[node] = 1;
int cur_node;
while(!stack_dfs.empty()){
cur_node = stack_dfs.top();
stack_dfs.pop();
cout
| Web Proxy Viewer | New URL | Original Page |