I have unordered_hashmapone that displays a string (e.g. personName or SSN) in struct Attributeswhich has many attributes of that person, including annualIncome. There are many such hash maps corresponding to various organizations such as mapOrganizationA, mapOrganizationBetc. I need to find people (with attributes) with top-yearly incomes. I thought to use a mini-heap with k-nodes (with a minimum salary from root), so that I can scan cards one by one, from the current item the income is greater than the root of the mini-heap, root can be updated. Is this the right approach to get top-k from different cards? Is there a datastucture in the STL that I can use.
source
share