Commit a815144e authored by Fokion Zervoudakis's avatar Fokion Zervoudakis

Reuse existing array.

parent 363e8656
......@@ -21,7 +21,9 @@ class ExternalSort {
var path = outPath + ++j;
write(MergeSort.sort(lines), path);
paths.add(path);
lines = new String[SIZE];
for (var k = 0; k < SIZE; k++) {
lines[k] = null;
}
i = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment