Using FFT to find all possible sum

后端 未结 0 1923
北恋
北恋 2021-01-03 12:09

Given array A[] and B[], to find how frequently each possible sums A[i] + B[j] appears we can use FFT

For example A = [1,2,3], B = [2,4].

The sum 3 can be obta

相关标签:
回答
  • 消灭零回复
提交回复
热议问题