2018-09-10 00:36:53 +00:00
|
|
|
import java.util.List;
|
2018-09-11 19:59:20 +00:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.lang.String;
|
2018-09-10 00:36:53 +00:00
|
|
|
|
|
|
|
class Sorting{
|
|
|
|
merge(a, b){
|
|
|
|
a.addAll(b);
|
|
|
|
return a;
|
|
|
|
}
|
2018-09-27 13:59:57 +00:00
|
|
|
/*
|
2018-09-26 13:40:51 +00:00
|
|
|
sort(in){
|
|
|
|
var firstHalf = in;
|
|
|
|
var secondHalf = in;
|
|
|
|
return merge(sort(firstHalf), sort(secondHalf));
|
|
|
|
}
|
2018-09-27 13:59:57 +00:00
|
|
|
*/
|
2018-09-11 19:59:20 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
void sort(ArrayList<String> a){
|
|
|
|
a = merge(a,a);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|