LTIMindtree interview question

DSA question 1: Two Sum