20 lines
323 B
Plaintext
20 lines
323 B
Plaintext
|
import java.util.List;
|
||
|
import java.lang.Integer;
|
||
|
//import java.util.Collection;
|
||
|
|
||
|
public class Merge {
|
||
|
|
||
|
public merge(a, b) {
|
||
|
a.addAll(b);
|
||
|
return a;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
public sort(in){
|
||
|
var firstHalf = in.subList(1,2);
|
||
|
var secondHalf = in.subList(1,2);
|
||
|
return merge(sort(firstHalf), sort(secondHalf));
|
||
|
}
|
||
|
|
||
|
}
|