Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 950 Bytes

File metadata and controls

15 lines (13 loc) · 950 Bytes

Counter Technique

Counter technique is simply using same old dict object in Python to solve the problems. There is also specific subclass of dict for this matter as collections.Counter. The key point of this technique is not how to use counters but rather how to develop an algorithm which uses counters to solve the problem efficiently. Therefore related problems are going to be much more explanatory for this topic.

Related Problems

HackerRank - Count Triplets
HackerRank - Frequency Queries
HackerRank - Largest Rectangle
HackerRank - Sherlock and the Valid String HackerRank - Special String Again

Related Resources

https://docs.python.org/3/library/collections.html#collections.Counter