there is a problem in my work. Two arrays of infinite length, A & M B, have a similar structure as follows:
{
a:2,
b:3,
c:4,
d:5
...
}
{
b:1,
c:5,
e:3,
...
}
needs to combine the data of the top 10 with the largest amount of data added together (for example, the top 10), but because the two arrays of memory space cannot be added directly, only part of the data can be sorted and then added and compared. So is there an algorithm that can implement this problem?