Capital One Interview Question

not that hard