def sorted_squares_brute_force(nums: list[int]) -> list[int]:
    """Returns a (non-decreasing) sorted array of the squares of each element in nums

    Naively squares each element and sorts the array

    Complexity:
        n = len(nums)
        Time: O(nlogn)
        Space: O(n) (for the sorted array)
            Note: even if "in-place", still O(n) for the timsort auxillary space.

    Args:
        nums: a sorted array of numbers drawn from the range [-∞,+∞]

    Examples:
        >>> sorted_squares_brute_force([])
        []
        >>> sorted_squares_brute_force([-4,-1,0,3,10])
        [0, 1, 9, 16, 100]
        >>> sorted_squares_brute_force([-7,-3,2,3,11])
        [4, 9, 9, 49, 121]

    """
    for i in range(len(nums)):
        nums[i] *= nums[i]
    return sorted(nums)