Why Nostr? What is Njump?
2024-04-25 19:37:34

mrdot on Nostr: #asknostr #programming #sets I have a set of tuples (A, B). I want to find the subset ...

#asknostr #programming #sets
I have a set of tuples (A, B).
I want to find the subset for which
- there is no other subset with a higher total sum of A and
- for which the average amount of B is above a threshold X.

What algorithm can I use here?
Author Public Key
npub1fv87668hlpm85p2dmzl40lk3l6mkh8nyt2tk7pngmjtulhyp4xequv2t36