Frequency Counters — What are they and how they can help you solve algorithms with greater efficiency.
Frequency Counters — how they can help decrease time and space complexity in algorithms
In the middle of interviews and practicing never-ending algorithms, I’ve started to implement more than one solution to every problem. Mainly algorithms that require comparing two sets of arrays or objects to test similarities and differences.
Often, my direct solution involved nested loops to get to the answer. However, looking back at my…