Squaring A Sorted Array
Two Pointers
Problem
Given an array of integers A
sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
For example:
Solution
Last updated
Was this helpful?