Autodesk interview question

Two-sum question in Python, and the time complexity.