[Java/Python 3] Sort both and sum the corresponding difference.
java\n    public int minMovesToSeat(int[] seats, int[] students) {\n        Arrays.sort(seats);\n        Arrays.sort(students);\n        int moves = 0;\n       
```java\n    public int minMovesToSeat(int[] seats, int[] students) {\n        Arrays.sort(seats);\n        Arrays.sort(students);\n        int moves = 0;\n        for (int i = 0; i < seats.length; ++i) {\n            moves += Math.abs(seats[i] - students[i]);\n        }\n        return moves;\n    }\n```\n```python\n    def minMovesToSeat(self, seats: List[int], students: List[int]) -> int:\n        seats.sort()\n        students.sort()\n        return sum(abs(e - t) for e, t in zip(seats, students))\n```\nIn case you love short python 3 code:\n\n```python\n    def minMovesToSeat(self, seats: List[int], students: List[int]) -> int:\n        return sum(abs(st - std) for st, std in zip(*map(sorted, (seats, students))))\n```\n\n**Analysis:**\n\nTime: `O(nlogn)`, space: `O(S)`, where `n = seats.length, S = space cost during sorting`.
['Java', 'Python3']