Presidio interview question

Problem solving, i got Leetcode two sum