...

/

Squares of a Sorted Array

Squares of a Sorted Array

Try to solve the Squares of a Sorted Array problem.

Statement

You are given an integer array, nums, sorted in non-decreasing order. Your task is to return a new array containing the squares of each number, also sorted in non-decreasing order.

Constraints:

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