GoTo Financial interview question

Coding Two Sum CQuestions, behavioral, critical thinking