Tap here to switch tabs
Problem
Submissions

Problem: Maximum Unique Subarray Sum After Deletion

med
30 min
Try to solve the Maximum Unique Subarray Sum After Deletion problem.

Statement

You are given an integer array nums.

You may delete any number of elements from nums. After performing the deletions, select a contiguous subarray from the remaining array such that all elements in the selected subarray are unique.

Return the maximum possible sum of such a subarray.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • −100≤-100 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Unique Subarray Sum After Deletion

med
30 min
Try to solve the Maximum Unique Subarray Sum After Deletion problem.

Statement

You are given an integer array nums.

You may delete any number of elements from nums. After performing the deletions, select a contiguous subarray from the remaining array such that all elements in the selected subarray are unique.

Return the maximum possible sum of such a subarray.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • −100≤-100 \leq nums[i] ≤100\leq 100