Fintech Interview Question

Two sum leetcode question, easy