Manulife interview question

Leetcode 1, (two sum I think?)