Pergunta de entrevista da empresa RavenPack

Solve the alphabet soup problem and explain your solution using Big 0 notation