Pregunta de entrevista de Google

Deaigning data structures Dsa question with follow up