Pergunta de entrevista da empresa BNY

2 coding question related to data structures and algorithms