Domanda di colloquio di JPMorganChase

My coding test was similar to TwoSum problem