IBM interview question

Two Sum Algorithm