JavaCompilerCore/resources/javFiles/Sorting.jav

15 lines
267 B
Plaintext
Raw Normal View History

2018-09-09 16:53:43 +00:00
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));
2018-09-09 16:53:43 +00:00
}
}