Pregunta de entrevista de Amazon

Two sum problem but had different edge cases