Question DSA-TP-0080
HardSquares of a sorted array (which may contain negatives) can be produced in sorted order in O(n) by:
- A.
Comparing absolute values at both ends and filling the result from the back
- B.
Binary search
- C.
Sign up free to see the answer and a step-by-step explanation.