GeoDigital interview question

two sum question type leetcode