Pergunta de entrevista da empresa Amazon

Design/Write an algorithm to find the most-popular sequence of three pageTypes in a row.