talks are shit show me code
\nclass Solution {\n    public int maximumUniqueSubarray(int[] nums) {\n        int s[]=new int[nums.length];\n        s[0]=nums[0];\n        for(int i=1;i<nums
```\nclass Solution {\n    public int maximumUniqueSubarray(int[] nums) {\n        int s[]=new int[nums.length];\n        s[0]=nums[0];\n        for(int i=1;i<nums.length;i++)s[i]+=s[i-1]+nums[i];\n        int p[]=new int[1000000];\n        Arrays.fill(p,-1);\n        int ans=0,b=0;\n        for(int i=0;i<nums.length;i++){\n            if(p[nums[i]]>=b){\n                //System.out.println(i);\n                b=p[nums[i]]+1;\n                p[nums[i]]=i;\n                ans=Math.max(ans,s[i]-s[b]+nums[b]);\n            }\n            else{\n                p[nums[i]]=i;\n                 ans=Math.max(ans,s[i]-s[b]+nums[b]);\n            }\n          \n        }\n        return ans;\n    }\n}```
['Two Pointers']