Squares of a Sorted Array
CodingPhone, OnsiteSoftware Engineer, Machine Learning EngineerReported Sep, 2026Medium Frequency
Company question banks are included with the Insider plan.
Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.
You should solve it in linear time instead of sorting the...