ABC interview question

Two sum was asked here.