Java solution
\n# Approach\n Describe your approach to solving the problem. \nin this solution we use inbuilt sorting algorithm to sort both arrays and then using for loop we
\n# Approach\n<!-- Describe your approach to solving the problem. -->\nin this solution we use inbuilt sorting algorithm to sort both arrays and then using for loop we found the absolute difference  between bothe arrays and summing up all those becomes the minimum number of moves we get.\n\n\n\n\n# Code\n```\nimport java.util.*;\nclass Solution {\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```\n``PLease Upvote If Yoo Find The Solution Useful``
['Java']