Insert one value anywhere in an array to minimize the sum of squared consecutive differences.
Unlock detailed company stats for this questionUpgrade
Given an array, cost = sum of (curr - prev)^2 over consecutive elements, 0-indexed starting from index 1. You get one move, inserting any value anywhere in the array, to minimize the cost after that move. This was the basic OA question.
Community answers
No answers contributed by the community yet.


