This project demonstrates two approaches to counting the frequency of integers in an array using C++:
- Fixed-size array hashing (efficient for small, bounded ranges).
unordered_maphashing (flexible for large or unbounded ranges).
It also supports answering queries about how many times a given number appears in the input.
- C++11 or later
- Standard Template Library (STL)
Compile with:
g++ -std=c++11 frequency_counter.cpp -o frequency_counter