Pergunta de entrevista da empresa Check Point Software Technologies

input is a sorted array with numbers (positive and negative) output should be sorted array with its values squared