Worst Dot Product — Solution & Editorial
Pair A ascending with B descending — the rearrangement inequality's other extreme.
Complexity: O(N log N)
Pair A ascending with B descending — the rearrangement inequality's other extreme.
Complexity: O(N log N)