MongoDB interview question

Square all the numbers in a sorted array and maintain sortedness