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:
nums.length
nums[i]
nums is sorted in non-decreasing order.
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:
nums.length
nums[i]
nums is sorted in non-decreasing order.