mrdot on Nostr: The answer by the way was very simple: sort by descending density and loop over each ...
The answer by the way was very simple: sort by descending density and loop over each item. Try to add id to the subset and if the average amount of B remains above X keep it added. If it isn’t, skip it and try with the next item until you went through all of them
Published at
2024-05-07 15:11:18Event JSON
{
"id": "957e4bbf37efde11bbf52359d8b1e9f1a19cd9696b8cee18b26ae9cc998391d8",
"pubkey": "4b0fed68f7f8767a054dd8bf57fed1feb76b9e645a976f0668dc97cfdc81a9b2",
"created_at": 1715094678,
"kind": 1,
"tags": [
[
"e",
"597eeec263787515ad219e0184cce057e2ec074724e86a22595d523060d47948",
"",
"reply"
],
[
"p",
"4b0fed68f7f8767a054dd8bf57fed1feb76b9e645a976f0668dc97cfdc81a9b2"
],
[
"e",
"5eb044937f2ea5644e00d728351633e732062f8538583b84d16de48a9adedaf6",
"",
"root"
]
],
"content": "The answer by the way was very simple: sort by descending density and loop over each item. Try to add id to the subset and if the average amount of B remains above X keep it added. If it isn’t, skip it and try with the next item until you went through all of them",
"sig": "868bd902c46186fb970a6f6ba4d62531d83260be9b058409f37029f19f91642c242e04e80f5878a2cf2fcbfb0d2fa87712b975ad6169c9137729900f3875b80c"
}