Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.
Squaring a negative number makes it positive, so the smallest squares may come from the middle of the array. Try to solve it in O(n) time without sorting the squared values.