Amazon Interview Question

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