Tap here to switch tabs
Problem
Submissions

Problem: Sort Transformed Array

med
30 min
Try to solve the Sort Transformed Array problem.

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

med
30 min
Try to solve the Sort Transformed Array problem.

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.