Advertisement
vaibhav1906

Unordered_set_map

May 25th, 2021
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. //Avg Time complexity O(1)
  4. //Avg Space complexity O(N)
  5. int main(){
  6.     int n=4;
  7.     unordered_set<int>s;
  8.     s = {2,4,1,6};
  9.     unordered_set<int> s:: iterator it;
  10.     for(it=s.begin(); it!=s.end(); it++){
  11.         cout<<*it<<" ";
  12.     }
  13.    
  14.    
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement