Advertisement
momo2345

find frequency

Jul 29th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. int findFrequency(vector<int> v, int x){
  2.     map<long long,int> c;
  3.     for(auto u : v) c[u]++;
  4.     return c[x];
  5.    
  6.    
  7. }
  8.  
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement