text: Traverse through the map and check if its second element that is the frequency is odd or not . Then this is the odd occurring element . Its is clearly mentioned in problem that there are only two odd occurring elements so this will print those two elements .
code: cout << " The ▁ two ▁ ODD ▁ elements ▁ are ▁ " ; for ( auto & x : m ) { if ( x . second % 2 != 0 ) cout << x . first << " , ▁ " ; } }