forked from JavaTX/JavaCompilerCore
15 lines
267 B
Plaintext
15 lines
267 B
Plaintext
|
import java.util.List;
|
||
|
import java.util.Collection;
|
||
|
|
||
|
class Sorting{
|
||
|
void merge(a, b){
|
||
|
a.addAll(b);
|
||
|
return a;
|
||
|
}
|
||
|
|
||
|
sort(in){
|
||
|
var firstHalf = in;
|
||
|
var secondHalf = in;
|
||
|
return merge(sort(firstHalf), sort(secondHalf));
|
||
|
}
|
||
|
}
|