Search⌘ K
AI Features

Squares of a Sorted Array

Squares of a Sorted Array provides a non-decreasing integer array, possibly containing negatives. Return a new array with every value squared and the results sorted in non-decreasing order.

Statement

You are given an integer array, nums, sorted in non-decreasing order. Your task is to return a new array ...