Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- multiset<int> multisetInsert(int arr[],int n)
- {
- multiset<int>s;
- for(int i=0;i<n;i++)
- {
- s.insert(arr[i]);
- }
- return s;
- }
- void multisetDisplay(multiset<int>s)
- {
- for(auto u:s) cout<<u<<" ";
- cout<<endl;
- }
- void multisetErase(multiset<int>&s,int x)
- {
- if(s.erase(x))
- cout<<"erased "<<x;
- else
- cout<<"not found";
- cout<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement