vendredi 17 juillet 2020

What does 'if((mask | u)==u)' mean?

This is the recurrence relation of maximum sum subset problem.

The complete code is:

if ((mask | u) == u)
    dp[u] = max(max(0, dp[u ^ mask] + array[I], dp[u]);

What does exactly mean the following if-statement?

if((mask | u) == u)

Thank you in advance!

Aucun commentaire:

Enregistrer un commentaire