mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Add BFS and DFS for tree.
This commit is contained in:
@@ -39,7 +39,7 @@ describe('depthFirstSearch', () => {
|
||||
const enterVertexCallback = jest.fn();
|
||||
const leaveVertexCallback = jest.fn();
|
||||
|
||||
// Traverse graphs without callbacks first.
|
||||
// Traverse graphs without callbacks first to check default ones.
|
||||
depthFirstSearch(graph, vertexA);
|
||||
|
||||
// Traverse graph with enterVertex and leaveVertex callbacks.
|
||||
|
||||
Reference in New Issue
Block a user