Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3574. Maximize Subarray GCD Score
Given an array nums and up to k operations that can double distinct elements (each at most once), choose a contiguous subarray and up to k elements to double to maximize the score defined as (subarray length × GCD of its elements). With n ≤ 1500 and nums up to 1e9, the challenge is to efficiently explore subarray GCDs and the combinatorial impact of up to k single-element doublings.
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.