Python3 solution | set | faster than 88%
\'\'\'\nUpvote if you like it\n\nclass Solution:\n    def maximumUniqueSubarray(self, nums: List[int]) -> int:\n        msf = -9999 # max sum so far\n        me
\'\'\'\nUpvote if you like it\n```\nclass Solution:\n    def maximumUniqueSubarray(self, nums: List[int]) -> int:\n        msf = -9999 # max sum so far\n        meh = 0 # max sum ending here\n        s = set()\n        j = 0\n        i = 0\n        while j < len(nums):\n            meh += nums[j]\n            while nums[j] in s:\n                meh -= nums[i]\n                s.remove(nums[i])\n                i += 1\n            s.add(nums[j])\n            if msf < meh:\n                msf = meh\n            j += 1\n        return msf\n```\n\n\'\'\'
['Ordered Set', 'Python', 'Python3']