Return a sorted array of the squares of each number in a non-decreasing input array.
Constraints
Example
>>> sorted_squares([-4,-1,0,3,10]) [0, 1, 9, 16, 100] >>> sorted_squares([-7,-3,2,3,11]) [4, 9, 9, 49, 121]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints