Hello ,

I have map of the following type:
typedef map < int, vectorofInts > ,

Now the map has finite size. Each user when he registers, he will be allocated a key.
Lets say the map size is 4.

U1 will be allocated in K1.
next U2 on K2, U3 on K3, U4 on K4.

Later it happens in round robin way, U5 with K1 etc.

Meantime, U1 may dropoff, in that case U6, needs to be allocated K1. to keep uniformity and priority.

Any feedback or idea regarding this alogrithm and optimum way to implement. Sorry that i am not c++ stl expert, working occasionally on this.


Re: help in finding the smallest list in a map of list based on priority 80 80

A look at your code would help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.