Completed the DP solution to existence of subset sum problem