Capital One Interview Question

It was an onlune Coding Challenge