two-pointer-backward-fill-avoids-sort

Status: IN

The squares-of-sorted-array solution fills the result array from index n-1 down to 0 using two inward-converging pointers, achieving O(n) time instead of O(n log n) square-then-sort

Source: entries/2026/06/06/squares-of-a-sorted-array-solution.md

Depended on by

JSON