Pergunta de entrevista da empresa Capital One

Series of Technical Questions (How would you code this?)