C++ || minimum-number-of-moves-to-seat-everyone
https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone\n\n\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& s
https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone\n\n```\nclass Solution {\npublic:\n    int minMovesToSeat(vector<int>& seats, vector<int>& students) {\n        sort(students.begin(),students.end());\n        sort(seats.begin(),seats.end());\n    \n        int sum=0;\n       \n        for(int i=0;i<seats.size();i++)\n        {\n            sum=sum+abs(seats[i]-students[i]);\n        }\n        return sum;\n    }\n};\n```\n\n\n![image](https://assets.leetcode.com/users/images/7cae2c8c-0bc4-4398-a152-7f5239ae3ab9_1634475902.212435.jpeg)\n
[]