20 lines
323 B
Plaintext
Raw Normal View History

2024-05-02 23:04:07 +02:00
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));
}
}