Pregunta de entrevista de Autodesk

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