Subset, use the dynamic programming to solve this problem

Signed-off-by: hwchiu <hwchiu@cs.nctu.edu.tw>