Skip to content

Commit 290183f

Browse files
committed
remove _pace method, add interval interface instead
1 parent 304d116 commit 290183f

File tree

22 files changed

+40
-33
lines changed

22 files changed

+40
-33
lines changed

algorithm/etc/dp/fibonacci/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
tracer._pace(300);
21
for (var i = 2; i < index; i++) {
32
D[i] = D[i - 2] + D[i - 1];
43
tracer._selectSet([i - 2, i - 1]);

algorithm/etc/dp/max_sum_path/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ for (var i = 0; i < D.length; i++) {
33
tracer._print('&nbsp;&nbsp;&nbsp;&nbsp;[' + D[i].join(', ') + ']');
44
}
55
tracer._print(']');
6-
tracer._pace(200);
76
var N = DP.length;
87
var M = DP[0].length;
98
for (var i = 0; i < N; i++) {

algorithm/etc/dp/sliding_window/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
tracer._pace(500);
21
var sum = D[0] + D[1] + D[2];
32
var max = sum;
43
tracer._print('sum = ' + sum, false);

algorithm/graph_search/bellman_ford/shortest_path/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ do {
6868
}
6969
while (src === dest);
7070

71-
tracer._pace(100);
7271
tracer._print('finding the shortest path from ' + src + ' to ' + dest);
7372
tracer._sleep(1000);
7473

algorithm/graph_search/bfs/shortest_path/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ do {
2828
e = Math.random() * G.length | 0;
2929
} while (s == e);
3030
var MAX_VALUE = Infinity;
31-
tracer._pace(100);
3231
tracer._print('finding the shortest path from ' + s + ' to ' + e);
3332
tracer._sleep(1000);
3433
var minWeight = BFS(s);

algorithm/graph_search/dfs/shortest_path/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ do {
2727
} while (s == e);
2828
var MAX_VALUE = Infinity;
2929
var minWeight = MAX_VALUE;
30-
tracer._pace(100);
3130
tracer._print('finding the shortest path from ' + s + ' to ' + e);
3231
tracer._sleep(1000);
3332
var D = []; // D[i] indicates whether the i-th node is discovered or not

algorithm/graph_search/dfs/weighted_graph/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function DFS(node, parent, weight) { // node = current node, parent = previous n
1212
tracer._leave(node, parent, 0);
1313
}
1414
var D; // D[i] indicates whether the i-th node is discovered or not
15-
tracer._pace(1000);
1615
for (var i = 0; i < G.length; i++) { // start from every node
1716
tracer._print('start from ' + i);
1817
D = [];

algorithm/graph_search/dijkstra/shortest_path/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,5 @@ var e; // e = end node
4545
do {
4646
e = Math.random() * G.length | 0;
4747
} while (s == e);
48-
tracer._pace(500);
4948
tracer._print('finding the shortest path from ' + s + ' to ' + e);
5049
Dijkstra(s, e);

algorithm/graph_search/floyd_warshall/shortest_paths/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ function FloydWarshall() {
3030
' to ' + j + ' is ' + S[i][j]);
3131
}
3232
var MAX_VALUE = Infinity;
33-
tracer._pace(200);
3433
tracer._print('finding the shortest paths from and to all nodes');
3534
FloydWarshall();

algorithm/search/binary_search/iterative/code.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ function BinarySearch(array, element) { // array = sorted array, element = eleme
3939
var element = D[Math.random() * D.length | 0];
4040

4141
tracer._sleep(1000);
42-
tracer._pace(1000);
4342
tracer._print('Using iterative binary search to find ' + element);
4443
BinarySearch(D, element, 0, D.length - 1);

0 commit comments

Comments
 (0)