My issue
- Removing an element:
s.erase(x);
- This removes one occurrence of the element
x
from the multiset, if it exists. If there are multiple occurrences ofx
, only one of them will be removed.
- This removes one occurrence of the element
This is written but when I run the code erase removes all occurrences of x. Please correct this.
Learning course: STLs in C++
Problem Link: Practice Problem in - CodeChef