Pregunta de entrevista de Hilti Group

it was a data structures and algorithms related question