659. Sorted Squares
You have a strong affinity for finding the squares of numbers. Your goal is to sort an array of integers by finding the squares of each number. Given an integer array nums sorted in non-decreasing order, output an array of the squares of each number, sorted in non-decreasing order.
The first line contains an integer N (the size of the array). The second line contains the integer array.
Print the array of squared and sorted numbers.
5 -3 -2 0 1 4
0 1 4 9 16
1 <= N <= 10^4 -10^4 <= Nums[i] <= 10^4