Domanda di colloquio di Capital One

Two coding questions that I did not pass.