Arista Networks interview question

Q. Leetcode two sum problem