Algorithm · Waymo · Medium
Requirements Given integer coefficients a, b, and c for the quadratic function $$f(x) = a\cdot x^{2} + b\cdot x + c$$, along with an integer array nums sorted in ascending order, implement the function below: Return all transformed values [f(nums[0]), f(nums[1]), …] in ascending order. The coefficient a can be positive, zero, or negative; its sign determines whether the parabola opens upward or downward. Examples Example 1 Applying $$f(x) = x^{2} - 2x + 3$$ produces [27, 6,…
Checking your access…