Minimum K to Reduce Array Within Limit at Google
Medium41.1% acceptance
This problem has 12.5% frequency at Google.
Problem Description
You are given a **positive** integer array `nums`. For a positive integer `k`, define `nonPositive(nums, k)` as the **minimum** number of **operations** needed to make every element of `nums` **non-positive**. In one operation, you can choose an index `i` and reduce `nums[i]` by `k`. Return an int...
Read full problem and hintsTopics
More Google Questions
Two SumEasyMedian of Two Sorted ArraysHardLongest Common PrefixEasyTrapping Rain WaterHardLongest Consecutive SequenceMedium
View all Google questions