Pregunta de entrevista de Lowe's Home Improvement

Time complexity related to different Data structures