WEX interview question

OA was Leetcode level easy problem.