Pergunta de entrevista da empresa Google

They asked me a DSA question to solve with structs