Python 3 || 3 lines, map || T/S: 96% / 83%
I know this seems to be the common solution for this problem, but I thought I\'d jump in because I haven\'t seen a map solution posted yet.\n\nAnd I do like map
I know this seems to be the common solution for this problem, but I thought I\'d jump in because I haven\'t seen a `map` solution posted yet.\n\nAnd I do like `maps`.\n\n```\nclass Solution:\n    def minMovesToSeat(self, seats: List[int], \n                             students: List[int]) -> int:\n\n        seats.sort()\n        students.sort()\n\n        return sum(map(lambda x: abs(x[0] - x[1]), \n                                        zip(seats,students)))\n\n```\n[https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone/submissions/1286490204/?envType=daily-question&envId=2024-06-13](https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone/submissions/1286490204/?envType=daily-question&envId=2024-06-13)\n\nI could be wrong, but I think that time complexity is *O*(*N* log *N*) and space complexity is *O*(1), in which *N* ~ `len(seats)`.
['Python3']