Conversation
maykov
commented
Dec 8, 2021
|
@maykov can you think about faster solution, which not suffers from potential OOM? |
|
Sorry, I didnt see this message. Here is one potential way: Read t1 into RAM and sort by a. Read t2 into RAM. While reading t2 into RAM, update t1 in RAM with SUM(yz) for all such a<b+c. Another idea could be to replace all ArrayLists and such with double[][]. Should I implement any of these? So far, I'm not seeing a way to reduce runtime to less than O(nnlog(n)). This is due to the fact that join is on a<b+c, but top 10 is on sum(xyz). Is there a way? I will keep thinking. |
|
@maykov any progress? |
|
Hi @avavilau , I need to brainstorm with you before going forward with a solution. Which approach should work the best:
|