Python3 program to implement the above approach
import math NEW_LINE def isSubsetSum ( arr , n , sum ) : NEW_LINE INDENT subset = [ [ True for x in range ( sum + 1 ) ] for y in range ( n + 1 ) ] NEW_LINE DEDENT