[C++] Sliding Window  - Clear and Concise - O(n)
\nclass Solution {\npublic:\n    int maximumUniqueSubarray(vector<int>& nums) {\n        unordered_map<int,bool> um;\n        int n = nums.size();\n        int 
```\nclass Solution {\npublic:\n    int maximumUniqueSubarray(vector<int>& nums) {\n        unordered_map<int,bool> um;\n        int n = nums.size();\n        int start = 0;\n        int curr_sum = 0;\n        int max_sum = 0;\n        for(int i = 0; i < n; i++){\n            while(um[nums[i]] == true){\n                curr_sum -= nums[start];\n                um[nums[start]] = false;\n                start++;\n            }\n            um[nums[i]] = true;\n            curr_sum += nums[i];\n            max_sum = max(max_sum, curr_sum);\n        }\n        return max_sum;\n    }\n};\n```
['Two Pointers', 'C', 'Sliding Window', 'C++']