LogicDecisions Initially you could arrive at a O(n2) solution with 2 FOR loops Upgrading the logic to a O(n) solution using a dictionary in Python is a good pythonic way