Bitmask as a Set
An integer is a subset; counting to 2^n lists them all.
Free account
Sign in to keep going. It is free.
The first 2 lessons of every module open without an account. Sign in for the rest — every lesson is free on an account, and your progress follows you between devices.
Sign in with a linkNot ready to sign in? Back to Bit Manipulation — its first 2 lessons are open without an account.