You are given a sorted integer array nums (non-decreasing order) and integers a, b, c that define a quadratic function:
Apply the function to every element in nums, producing an array res[i] = f(nums[i]). Return res in sorted (non-decreasing) order.
nums
: sorted array of integers
a
,
b
,
c
: integers
f(x)
for each
x
in
nums
1 <= len(nums) <= 2 * 10^5
-10^4 <= nums[i], a, b, c <= 10^4
nums = [-4,-2,2,4], a = 1, b = 3, c = 5
[3,9,15,33]