24 lines
316 B
Java
24 lines
316 B
Java
import java.util.List;
|
|
import java.util.ArrayList;
|
|
import java.lang.String;
|
|
|
|
public class Sorting{
|
|
merge(a, b){
|
|
a.addAll(b);
|
|
return a;
|
|
}
|
|
|
|
sort(in){
|
|
var firstHalf = in;
|
|
var secondHalf = in;
|
|
return merge(sort(firstHalf), sort(secondHalf));
|
|
}
|
|
|
|
|
|
/*
|
|
void sort(a){
|
|
a = merge(a,a);
|
|
}
|
|
*/
|
|
}
|