214k views
2 votes
In Geography, what is the primary task in the 977. Squares of a Sorted Array?

a) Sorting the array in decreasing order.
b) Returning an array of the squares of each number.
c) Identifying locations on a map.
d) Converting numbers into Roman numerals.

User Danboh
by
7.7k points

1 Answer

0 votes

Final answer:

The primary task in the 977. Squares of a Sorted Array is option b) Returning an array of the squares of each number.

Step-by-step explanation:

The primary task in the 977. Squares of a Sorted Array is option b) Returning an array of the squares of each number. In this problem, you are given an array of integers and you need to square each number in the array and return a new array with the squares in sorted order. For example, if the input array is [1, 2, 3], the output array will be [1, 4, 9] because the squares of these numbers are 1, 4, and 9. The array is sorted in ascending order by default, so you don't need to do any sorting.

User Giulio Roggero
by
8.0k points