RemoteState interview question

Two sum problem in a array.