simple and easy C++ solution 😍❤️‍🔥
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& students) \
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n```\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& students) \n    {\n        sort(seats.begin(),seats.end());\n        sort(students.begin(),students.end());\n\n        int ans = 0, n = seats.size();\n        for(int i=0;i<n;i++)\n            ans += abs(seats[i]-students[i]);\n        return ans;\n    }\n};\n```
['Array', 'Sorting', 'C++']