Smallest Range I Problem
Smallest Range I Problem — ExecCode Easy DSA Practice
Solve the Smallest Range I problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Description You are given an integer array nums and an integer k. In one operation, you can choose any index i where 0 <= i < nums.length and change nums[i] to nums[i] + x where x is an integer from the range [-k, k]. You can apply this operation at most once for each index i. T…
Practice Smallest Range I free on ExecCode. Browse more ExecCode DSA problems.