Pergunta de entrevista da empresa Meta

General algorithm involving list merging, string pattern, math functions.