Squares of a Sorted Array

Statement

Given an integer array, sorted in non-decreasing order, return an array of the squares of each number, sorted in non-decreasing order.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.