Maximum Unique Sublist Sum
You are given a list of non-negative integers nums. Return the maximum sum of a sublist in nums containing only unique values.
Constraints
1 ≤ n ≤ 100,000wherenis the length ofnums
https://binarysearch.com/problems/Maximum-Unique-Sublist-Sum
Examples
Example 1
Input
- nums =
[1, 2, 2, 3, 4, 4]
Output
- answer =
9
Explanation
We can take the sublist [2, 3, 4] which has unique numbers.
Leave a comment