elements of set c 2b 2b

Solutions on MaxInterview for elements of set c 2b 2b by the best coders in the world

showing results for - "elements of set c 2b 2b"
Soan
07 Nov 2017
1//Method 1:
2 set<int>:: iterator it;
3 for( it = s.begin(); it != s.end(); ++it){
4    int ans = *it;
5    cout << ans << endl;
6 }
7//Method 2:
8 for( auto& it : s) {
9     cout << it << " ";
10 }