[Greedy + Mathematical Proof] Minimum Number of Moves to Seat Everyone]
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nSort the Arrays:\n\nFirst, sort both the seats and students arrays. This 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nSort the Arrays:\n\nFirst, sort both the seats and students arrays. This helps to pair the closest seat to the closest student.\nCalculate the Total Moves:\n\nInitialize a sum variable to 0.\nLoop through the arrays and for each pair of seat and student at the same index, calculate the absolute difference (i.e., the number of moves needed for that student to sit in that seat) and add it to the sum.\nReturn the Result:\n\nReturn the total sum, which represents the minimum number of moves needed for all students to sit down\n\n# Complexity\n- Time complexity:\n\uD835\uDC42\n(\n\uD835\uDC5B\nlog\n\u2061\n\uD835\uDC5B\n)\nO(nlogn).\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int minMovesToSeat(int[] seats, int[] students) {\n       \n        int sum= 0;\n        for(int i= 0;i<seats.length;i++){\n            Arrays.sort(seats);\n        Arrays.sort(students);\n             sum  +=Math.abs(seats[i]-students[i]);\n             \n             \n\n        }\n      \n        return Math.abs(sum);\n        \n    }\n}\n```
['Array', 'Greedy', 'Sorting', 'Java']