MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/hashing/arr_frequency.cpp:10–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8const int N=1e7+10;
9int hash_arr[N];
10int main(){
11 //cin.tie(0)->sync_with_stdio(0);
12 int n;cin>>n;
13 int arr[n];
14
15
16 for (int i = 0; i < n; ++i)
17 {
18 cin>>arr[i];
19 hash_arr[arr[i]]++;
20
21 }
22 int q;cin>>q;
23 while(q--){
24 int i;cin>>i;
25 cout<<hash_arr[i]<<endl;
26 }
27 return 0;
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected