We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af6de19 commit f5645bbCopy full SHA for f5645bb
test/graphs/searching/bfs.spec.js
@@ -34,6 +34,16 @@ describe('BFS', function () {
34
expect(bfs(graph, 0, 2)).toBeFalsy();
35
});
36
37
+ /**
38
+ * In this case the graph should not
39
+ * update the parent of 2, in case it was called
40
+ * with source 0 and target 2, after the first iteration.
41
+ *
42
+ * 0 ---> 1
43
+ * \ |
44
+ * \ v
45
+ * -> 2
46
+ */
47
it('should not update the parent node once set', function () {
48
var graph = [[0, 1, 1],
49
[0, 0, 1],
0 commit comments