Capital One Interview Question

Don't remember, but around leetcode easy-medium level