Using Python dict for Graphs

I recently came across a coding contest question to find all the unique paths from one vertex to another and ended up using Python dicts for this. Some excellent guidance on Python Patterns - Implementing Graphs .

Here is my code:

Comments

Popular Posts