You are viewing a single comment's thread. Return to all comments →
There's a constraint: 0 <= k <= 10^9
In your case of negative k, the minimum value can be obtained by the similar approach. Imagine a valley rather than a mountain.
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
There's a constraint: 0 <= k <= 10^9
In your case of negative k, the minimum value can be obtained by the similar approach. Imagine a valley rather than a mountain.