Homework 2 (frequent pattern mining) of Data Structure Practice course