Skip to content

Commit 88914ec

Browse files
committed
Radix cleanup (algorithm-visualizer#47)
* Radix cleanup * Radix cleanup
1 parent 1806dae commit 88914ec

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

algorithm/category.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"quick": "Quicksort",
3232
"merge": "Mergesort",
3333
"heap" : "Heap Sort",
34-
"radixlsd" : "Radix LSD sort"
34+
"radix" : "Radix Sort"
3535
}
3636
},
3737
"string": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"<a href='https://en.wikipedia.org/wiki/Radix_sort'>Wikipedia</a>"
99
],
1010
"files": {
11-
"basic": "Basic"
11+
"lsd": "LSD Radix sort"
1212
}
1313
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function pow(base, expo){
88
}
99
return ans;
1010
}
11-
for(var exp = 0; exp < 6;exp ++){
12-
tracer._print("Bit "+exp);
11+
for(var exp = 0; exp < 3;exp ++){
12+
tracer._print("Digit: "+exp);
1313
for(var i = 0; i < D[0].length; i++){
1414
tracer._select(0, i);
1515
D[2][ parseInt( D[0][i] / pow(10, exp) % 10) ] += 1;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var tracer = new Array2DTracer();
2+
var k = Array1D.random(10, 1, 999);
3+
var D = [
4+
k,
5+
[0,0,0,0,0,0,0,0,0,0],
6+
[0,0,0,0,0,0,0,0,0,0]
7+
];
8+
tracer._setData(D);

algorithm/sorting/radixlsd/basic/data.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)