# Determine if there is a subset of the given set with sum divisible by a given integer

I've been given a question to solve:

Given a set of non-negative distinct integers, and a value $$m$$, determine if there is a subset of the given set with sum divisible by $$m$$.

For this question the answer is here

I don't understand the part after if DP[j]==True
what is actually the intuition behind this code. Please explain in detail.

• What do you make of the description at geeksforgeeks.org? – greybeard Sep 6 '20 at 6:13