Beats 99.9% solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(nlogn)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[]} seats\n * @param {number[]} students\n * @return {number}\n */\nvar minMovesToSeat = function(seats, students) {\n   // let count = 0;\n   let sum =0;\n   seats.sort((a,b)=>a-b);\n   students.sort((a,b)=>a-b);\n\n    for(let i=0;i<seats.length;i++)\n    {\n        if(seats[i]==students[i]){\n            continue;\n        }\n        else if(seats[i]>students[i]){\n            sum += (seats[i]-students[i]);\n        }\n        else{\n            sum +=(students[i]-seats[i]);\n        }\n    }\n    return sum\n};\n```\n# plz upvote my solution
['Array', 'JavaScript']