Use only a vector to replace the 2D table to solve the subset sum problem