Available question text
Find the maximum sum of any contiguous subarray that contains only unique elements. This reduces to a sliding-window / two-pointer problem maintaining a seen-set and running sum to compute the maximum in O(n) time (n up to 1e5).
Related questions
Continue with questions that share topics or the same question type.
- Find Maximum Value in a Constrained Sequence
Coding · Array · Greedy
- Find the Maximum Ancestor Value Across All Leaf Nodes in a Binary Tree
Coding
- Find the Maximum Sequence Value of Array
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1695. Maximum Erasure Value
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source