WEX Interview Question

OA was Leetcode level easy problem.