C++ implementation of the first step of APriori