Problem
Given an integer arraynums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.
Examples
Constraints
1 <= nums.length <= 10^4-10^4 <= nums[i] <= 10^4numsis sorted in non-decreasing order.
O(n) solution using a different approach?