BlazeSoft interview question

Two sum algorithm question. Can be found in Leetcode.