Seesaw interview question

LeetCode two sum question and using arrays