← 返回 amazon 的题目列表Frequent Page Visit Pattern
类型:online_judge
Given logs of user visits to pages in different sequences, each consecutive three pages form a key. Use a map to count the occurrence of each key and return the most frequent page sequence. Assume the number of pages and user visit records do not exceed memory limits.
Example
Input
A,B,C,D,A,B,C,E,A,B,C