Squares of a Sorted Array
EasyGiven a nondecreasing array, square each value and print the squares in nondecreasing order.
Input format:
- First line: n
- Second line: n sorted integers
Constraints
1 <= n <= 10^5 -10^4 <= nums[i] <= 10^4
1 <= n <= 10^5 -10^4 <= nums[i] <= 10^4