RefactorQ interview question

2sum dsa question was asked