import java.util.ArrayList; import java.lang.Math; import java.util.Arrays;

public class Solution { public ArrayList GetLeastNumbers_Solution(int [] input, int k) { Arrays.sort(input); ArrayList list = new ArrayList<>(); for(int i = 0;i < k;i++){ list.add(input[i]); } return list; } }