Skip to content
RED SAGSkills
medium10 pts · first answer countsarraystwo-pointers

Squares of a sorted array

The input [-4, -1, 0, 3, 10] is sorted. You need its squares in sorted order in O(n). What is the idea?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions