C++
Code\n\n#include <cstdlib>\n\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& students) {\n        std::sort(seats.begin(), s
# Code\n```\n#include <cstdlib>\n\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& students) {\n        std::sort(seats.begin(), seats.end());\n        std::sort(students.begin(), students.end());\n        int ans = 0;\n        int n = students.size();\n        for(int i=0;i<n;i++){\n            ans += abs(seats[i] - students[i]);\n        }\n        return ans;\n    }\n};\n```
['C++']