On a command line:
./breadth_first.js ./data.json
In node:
npm install graph-search
var search_tools = require('graph-search');
var data = require('./data.json');
search_tools.depth_first(data);
See the sample data file.
On a command line:
./breadth_first.js ./data.json
In node:
npm install graph-search
var search_tools = require('graph-search');
var data = require('./data.json');
search_tools.depth_first(data);
See the sample data file.