Capital One Interview Question

Two coding questions that I did not pass.