Create a function that accepts a non-empty array of integers sorted in ascending order. The function should return a new array of the same length, containing the squares of the original integers, also sorted in ascending order
NOTE : the output array should be of same length of input arrat
array = [1, 2, 3, 5, 6, 8, 9]
[1, 4, 9, 25, 36, 64, 81]