C++ || No Hashmap || Simple and easy solution
\n int maximumUniqueSubarray(vector<int>& nums) {\n        vector<int> m(10001);           // use this to store frequency as it is faster than map\n        int 
```\n int maximumUniqueSubarray(vector<int>& nums) {\n        vector<int> m(10001);           // use this to store frequency as it is faster than map\n        int n=nums.size(),ans=0,start=0,end=0,sum=0;\n        while(end<n)\n        {\n            sum+=nums[end];\n            m[nums[end]]++;\n            while(m[nums[end]]>1) \n            {\n                sum-=nums[start];\n                m[nums[start++]]--;\n            }\n            ans=max(ans,sum);\n            end++;\n        }\n        return ans;\n    }\n```
['Array', 'Two Pointers']