给定两个长度为 N 的整数数组 A 和 B。您必须找到两个求和的值:
Z=\xce\xa3 \xce\xa3 max(Ai+Bj, Bi+Aj)
这是我的暴力算法
请告诉我一个更有效的算法。
algorithm data-structures array-algorithms
algorithm ×1
array-algorithms ×1
data-structures ×1