Capital One interview question

silver card question, a typical one