assign this weight to array and recur for next state
wt [ curStep ] = arr [ i ] NEW_LINE if ( dfs ( arr [ i ] - residue , curStep + 1 , wt , arr , N , steps ) ) : NEW_LINE INDENT return True NEW_LINE DEDENT