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≤nums.length≤103 ...
⋮
Problem
Ask
Submissions
Solution
Solution: Squares of a Sorted Array
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.