Available question text
Choose a subsequence of length m that maximizes the product of its first and last elements — equivalently, pick indices i ≤ j with j − i + 1 ≥ m to maximize nums[i] * nums[j]. The core challenge is optimizing this pair selection under the index-distance constraint while handling sign effects (negatives and the m=1 squared case).
Related questions
Continue with questions that share topics or the same question type.
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 3584. Maximum Product of First and Last Elements of a Subsequence
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source