Easy Java Solution || 1 ms, faster than 100.00% of Java online submissions
class Solution {\n\n    public int minMovesToSeat(int[] seats, int[] students) {\n        int answer = 0;\n        Arrays.sort(seats);\n        Arrays.sort(stud
class Solution {\n\n    public int minMovesToSeat(int[] seats, int[] students) {\n        int answer = 0;\n        Arrays.sort(seats);\n        Arrays.sort(students);\n        \n        for(int i =0; i<seats.length; i++)\n            answer += Math.abs(seats[i]-students[i]);\n        \n        return answer;\n    }\n}
['Java']