Best Pairing — Solution & Editorial
Sort and pair adjacent values: big×big and (−big)×(−big) — an exchange argument shows any crossing pairing is never better.
Complexity: O(N log N)
Sort and pair adjacent values: big×big and (−big)×(−big) — an exchange argument shows any crossing pairing is never better.
Complexity: O(N log N)