Python | Easy Solution✅
Code\u2705\n\nclass Solution:\n    def distinctDifferenceArray(self, nums: List[int]) -> List[int]:\n        diff = []\n        for i in range(len(nums)):\n    
# Code\u2705\n```\nclass Solution:\n    def distinctDifferenceArray(self, nums: List[int]) -> List[int]:\n        diff = []\n        for i in range(len(nums)):\n            prefix = len(set(nums[:i+1]))\n            surfix = len(set(nums[i+1:]))\n            diff.append(prefix-surfix)\n        return diff\n```
['Python', 'Python3']