1122. Relative Sort Array Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1122class Solution: def relativeSortArray(self, arr1: List[int], arr2: List[int]) -> List[int]: pos = {x: i for i, x in enumerate(arr2)} return sorted(arr1, key=lambda x: pos.get(x, 1000 + x))