Sort Transformed Array
Given asortedarray of integersnumsand integer valuesa,bandc. Apply a quadratic function of the form f(x) =ax2+bx+cto each elementxin the array.
The returned array must be insorted order.
Expected time complexity:O(n)
Example 1:
Example 2:
分析
就是map函数映射,记得用lambda
Last updated