2018-08-06 11:25:41 +00:00
|
|
|
import java.util.List;
|
|
|
|
import java.lang.Integer;
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
class Merge {
|
|
|
|
|
|
|
|
merge(a, b) {
|
|
|
|
a.addAll(b);
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
2018-08-06 11:34:34 +00:00
|
|
|
|
2018-08-06 11:14:08 +00:00
|
|
|
/*
|
2018-08-06 11:25:41 +00:00
|
|
|
sort(in){
|
|
|
|
var firstHalf = in.subList(1,2);
|
|
|
|
var secondHalf = in.subList(1,2);
|
|
|
|
return merge(sort(firstHalf), sort(secondHalf));
|
|
|
|
}
|
2018-08-06 11:14:08 +00:00
|
|
|
*/
|
2018-08-06 11:25:41 +00:00
|
|
|
}
|