Ryan is an engineer in the Sacramento Area with a focus in Python, Ruby, and Rust. Bash/Python Exercism mentor. Coding, physics, calculus, music, woodworking. Looking for work!
Have you heard about the collections module in the standard library? It's got a class called Counter available that is really useful in situations like this. Check out the docs
I didn't know about this Counter class. It is awesome! But my idea with this whole algorithm series is to try to implement the algorithm without help from built-in methods or classes. Just the default data structures.
Ryan is an engineer in the Sacramento Area with a focus in Python, Ruby, and Rust. Bash/Python Exercism mentor. Coding, physics, calculus, music, woodworking. Looking for work!
Have you heard about the
collections
module in the standard library? It's got a class calledCounter
available that is really useful in situations like this. Check out the docsI didn't know about this
Counter
class. It is awesome! But my idea with this whole algorithm series is to try to implement the algorithm without help from built-in methods or classes. Just the default data structures.Thanks for the note! I really liked this class.
That makes sense. Thanks for sharing!