Question DSA-TP-0039
EasyHow can the squares of a sorted array that contains negative numbers be produced in sorted order in O(n)?
- A.
It can't be done in O(n)
- B.
Use binary search for each square
- C.
Sign up free to see the answer and a step-by-step explanation.