31
Last seen 2 years ago
Member for 8 years, 1 month, 5 days
Difficulty Normal
Reviewing my own code.
Line 9 would probably be better as: all_rings = set.union(*rings)
More
Self review: I should have used
return max(data, key=data.get)
instead.
More
Self review: while reviewing other (better) solutions, I realized that the two lists should simply have been directly compared. **return lett1 == lett2**
More
I really like the way that this takes advantage of unique capabilities of Python (like defaultdict and dict.get) to implement Dijkstra's algorithm in a clean and concise way.
More