Problem
Implement a phased favorites list. A phase consists of N accesses in the list, for a given parameter N. During a phase, the list should maintain itself so that elements are ordered by decreasing access counts during that phase. At the end of a phase, it should clear all the access counts and start the next phase. Experimentally, determine what are the best values of N for various list sizes.