Hikvision interview question

Online test has a Leetcode Two sum question