How detect duplicate card records? | Two Sigma Interview Question