SyntaxFix
Write A Post
Hire A Developer
Questions
I use
if(!my_set.count(that_element)) //Element is present... ;
But it is not as efficient as
if(my_set.find(that_element)!=my_set.end()) ....;
My version only saves my time in writing the code. I prefer it this way for competitive coding.