std::multiset
For problems needing logarithmic searching and removing,
like concert tickets,
std::multiset
multiset<int> tickets;
for {
auto it = tickets.upper_bound(x)
if () {
..
}
else {
tickets.erase(x)
}
}
For problems needing logarithmic searching and removing,
like concert tickets,
std::multiset
multiset<int> tickets;
for {
auto it = tickets.upper_bound(x)
if () {
..
}
else {
tickets.erase(x)
}
}