We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

# Subset Component

# Subset Component

#### Sort by

recency

#### |

#### 69 Discussions

#### |

Please Login in order to post a comment

The quality of the problems is good, but the platform's UI and the phrasing of the problems are quite irritating.

I think the example is wrong; it is missing the empty set. The test cases expect you to add the case of the empty set, but it is not present in the example.

All of my tests pass except test case 0:

I count all the subsets in which each particular bit will be unset, thus solitary. Then

add 1 for all subset, except the empty set, to count the cnon solitary components

Java8 - using bitwise operations

Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Subset Component Problem Solution