I saw this one , but I canβt understand how to apply it (not a pun) to my situation.
I have a sorted list of such cards: (note that there can be more than two keys on a card) ({name1 3, name2 7}, {name1 35, name2 7}, {name1 0, name2 3})
What I need is a data structure afterwards:
({: name1 [3,35,0]}, {: name2 [7,7,3]})
I struggled with this for a while and seemed unable to get close.
Caveats: the data should remain sorted, and I have N keywords for more than two.
source share