Pergunta de entrevista da empresa Susquehanna International Group

Coding question on data structure