Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3375. Minimum Operations to Make Array Values Equal to K
Given an array and a target k, you may repeatedly pick a valid h (all elements > h must be identical) and set those elements to h; compute the minimum operations to make every element equal to k, or return -1 if impossible. The core challenge is that values only decrease, so feasibility requires no element < k, and the minimal number of operations corresponds to the number of distinct values strictly greater than k.
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.