J.P. Morgan Interview Question

A Leetcode easy problem on Sets