Capital One Interview Question

Calculating whether credit card was valid or not based on rules