Tap here to switch tabs
Problem
Submissions

Problem: Sort Transformed Array

Sort Transformed Array applies a quadratic function with three coefficients to each value in an ascending array and asks you to return all transformed values in nondecreasing order.

Statement

Given an integer array nums sorted in ascending order and three integers a, b, and c, apply the quadratic function f(x)=a⋅x2+b⋅x+cf(x) = a \cdot x^2 + b \cdot x + c to each element nums[i] in the array.

Return an array containing all the transformed values sorted in non decreasing order.

Constraints:

  • 1≤1 \leq nums.length ≤200\leq 200

  • −100≤-100 \leq nums[i], a, b, c ≤100\leq 100

  • nums is sorted in ascending order.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sort Transformed Array

Sort Transformed Array applies a quadratic function with three coefficients to each value in an ascending array and asks you to return all transformed values in nondecreasing order.

Statement

Given an integer array nums sorted in ascending order and three integers a, b, and c, apply the quadratic function f(x)=a⋅x2+b⋅x+cf(x) = a \cdot x^2 + b \cdot x + c to each element nums[i] in the array.

Return an array containing all the transformed values sorted in non decreasing order.

Constraints:

  • 1≤1 \leq nums.length ≤200\leq 200

  • −100≤-100 \leq nums[i], a, b, c ≤100\leq 100

  • nums is sorted in ascending order.