Arm interview question

Leetcode TwoSum problem, asked to solve on notepad