Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3584. Maximum Product of First and Last Elements of a Subsequence
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.